Skip to content

About

A C++ string benchmark, comparing the performance of STL strings vs. ATL CString vs. custom pool allocator strings

Topics

Resources

Stars

2 stars

Watchers

2 watching

Forks

Latest commit

 

History

24 Commits

Folders and files

Repository files navigation

StringBenchmarkStlAtlPool

A C++ string benchmark, comparing the performance of STL strings vs. ATL CString vs. Custom Pool Allocator strings

by Giovanni Dicanio

Related blog post.

The string pool allocator code is implemented in the StringPool.hpp file (it's header-only).

The code compiles cleanly at warning level 4 (/W4) with VS 2022, in both 64-bit and 32-bit builds. It requires at least C++17; it builds successfully in C++20 mode as well.

The benchmark code is in the StringBenchmarkStlAtlPool.cpp file.

There is also an Excel file containing a sample of benchmark results.

Sample benchmark run

(The pool allocator code is based on an initial idea in a blog post published on The Old New Thing blog; the original code from that blog post is included in this repo.)

About

A C++ string benchmark, comparing the performance of STL strings vs. ATL CString vs. custom pool allocator strings

Topics

Resources

Stars

2 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages