From 780a5d6f3ac2afce9637f34d3882ad0df4970253 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Fri, 23 Mar 2018 15:53:54 +0100 Subject: [PATCH] src: use `unordered_map` for perf marks PR-URL: https://github.com/nodejs/node/pull/19558 Reviewed-By: Colin Ihrig Reviewed-By: Tiancheng "Timothy" Gu Reviewed-By: Trivikram Kamat Reviewed-By: James M Snell --- src/env-inl.h | 3 ++- src/env.h | 5 ++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/env-inl.h b/src/env-inl.h index 615d4b95a543bc..6d7520dab0acc8 100644 --- a/src/env-inl.h +++ b/src/env-inl.h @@ -566,7 +566,8 @@ inline performance::performance_state* Environment::performance_state() { return performance_state_.get(); } -inline std::map* Environment::performance_marks() { +inline std::unordered_map* + Environment::performance_marks() { return &performance_marks_; } diff --git a/src/env.h b/src/env.h index 1fee31a9479e2a..6459eb90a965e1 100644 --- a/src/env.h +++ b/src/env.h @@ -39,7 +39,6 @@ #include "node_http2_state.h" #include -#include #include #include #include @@ -642,7 +641,7 @@ class Environment { inline void set_fs_stats_field_array(double* fields); inline performance::performance_state* performance_state(); - inline std::map* performance_marks(); + inline std::unordered_map* performance_marks(); inline void ThrowError(const char* errmsg); inline void ThrowTypeError(const char* errmsg); @@ -774,7 +773,7 @@ class Environment { int should_not_abort_scope_counter_ = 0; std::unique_ptr performance_state_; - std::map performance_marks_; + std::unordered_map performance_marks_; #if HAVE_INSPECTOR std::unique_ptr inspector_agent_;