Skip to content

Instantly share code, notes, and snippets.

@kernelwernel
Last active April 9, 2026 21:40
Show Gist options
  • Select an option

  • Save kernelwernel/611d2d6f31704a6441c2f006e34887a7 to your computer and use it in GitHub Desktop.

Select an option

Save kernelwernel/611d2d6f31704a6441c2f006e34887a7 to your computer and use it in GitHub Desktop.
C++ quickbench benchmarks

C++ quickbench benchmarks

These are just various benchmarks I've performed on STL containers, algorithms, and other miscellaneous operations that I've faced.

Returning results of a switch: https://quick-bench.com/q/oi97WrteQIom9dmk9ka9TuZqstc

std::string concatenation: https://quick-bench.com/q/No_nYrHbcGwK5JTFl-qJtJ0ncc0

Number identifier to string result: https://quick-bench.com/q/gwOSfBAUuiprUYrkoo3N5SWD0UU

Hex string generation from int: https://quick-bench.com/q/1hf173hus7o-E-5lAB_trCghrdk

Bit range fetching: https://quick-bench.com/q/JqnAzdyhgQ9yuc4WflaEe_3tciE

Returning a struct from a function: https://quick-bench.com/q/I6QLhNNm0newehnFk9RqncBLBnc

Direct vs indirect std::string reserve: https://quick-bench.com/q/qVDRasiRhFteNSORR4y-_JraFWY

std::map vs std::unordered_map access https://quick-bench.com/q/sj-t_FYte9U-kYLXTZ0EMl8cBKA

std::string concatenation input types for string variations https://quick-bench.com/q/a8aNl-AclWkONwP0JPcRSwb3Y6U

std::map, std::unordered_map, and std::vector single index access https://quick-bench.com/q/bhDceFgnZ7D3qR3ZR2GdCjwlt8g

std::string key-value table lookup (100 elements, std::array vs std::unordered_map vs std::map) https://quick-bench.com/q/mloNd1QK_MdX243VwaEbf4TelFw

Ternary vs direct if condition return https://quick-bench.com/q/tL6LBrSQ4uO6rIgK-jd0a0DRR3A

Random bit generation: https://quick-bench.com/q/P1yTZfWqrbyjRh5Mh1Mxy8S27IQ

std::deque vs std::vector for push/pop operations https://quick-bench.com/q/aJyowHPHYI-kiVxQGAu7HtCHqEo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment