diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-10-31 13:36:34 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2018-11-01 15:51:22 +0000 |
commit | 593ef5981d0336bbe745936b166cd24ec754cac4 (patch) | |
tree | e70da2a38348701cc83666aa820da2689e9fa16b | |
parent | core: avoid unnecessary tx/blob conversions (diff) | |
download | monero-593ef5981d0336bbe745936b166cd24ec754cac4.tar.xz |
perf_timer: call reserve on new timer array
to avoid reallocations in the vast majority of the time
-rw-r--r-- | src/common/perf_timer.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/common/perf_timer.cpp b/src/common/perf_timer.cpp index 6910ebdd4..c5503416f 100644 --- a/src/common/perf_timer.cpp +++ b/src/common/perf_timer.cpp @@ -110,6 +110,7 @@ LoggingPerformanceTimer::LoggingPerformanceTimer(const std::string &s, uint64_t { MLOG(level, "PERF ----------"); performance_timers = new std::vector<LoggingPerformanceTimer*>(); + performance_timers->reserve(16); // how deep before realloc } else { |