mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +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 ----------");
|
MLOG(level, "PERF ----------");
|
||||||
performance_timers = new std::vector<LoggingPerformanceTimer*>();
|
performance_timers = new std::vector<LoggingPerformanceTimer*>();
|
||||||
|
performance_timers->reserve(16); // how deep before realloc
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue