apple / apple/foundationdb

Benchmark `Trace.cpp:SuppressionMap`

Open
#11,421 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
16.7k
Forks
1.6k
Avg merge
1d 20h
Merged PRs (30d)
126

Description

`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?

Contributor guide

Open the contributing guide

Research direction

Start at Trace.cpp:SuppressionMap and inspect how TraceEvent::type is copied and stored. Benchmark the current std::map behavior against avoiding copies for known values and the proposed std::unordered_map or custom implementation. Done means the alternatives have comparable results and a justified implementation choice.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
performance
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.