apple / foundationdb

FoundationDB - the open source, distributed, transactional key-value store
https://apple.github.io/foundationdb/
Apache License 2.0
14.19k stars 1.29k forks source link

Benchmark `Trace.cpp:SuppressionMap` #11421

Open xis19 opened 1 month ago

xis19 commented 1 month ago

Trace.cpp:SuppressionMap would (1) create a copy of the TraceEvent type string (2) Store the string inside the std::map data structure.

Considering the frequency of using TraceEvent it might be interesting to see:

  1. It is possible that SuppressionMap will only create a copy of the TraceEvent::type when it is unknown.
  2. Try std::unordered_map or some other custom implementation?