mirror of
https://github.com/monero-project/monero.git
synced 2024-11-18 00:37:43 +00:00
perf_timer: call reserve on new timer array
to avoid reallocations in the vast majority of the time
This commit is contained in:
parent
6ecc99ad1f
commit
593ef5981d
1 changed files with 1 additions and 0 deletions
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue