Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
bench_flat_containers.cc File Reference

Benchmarks for the flat containers (v5.5.0) against their tree-based Aleph counterparts and the STL. More...

#include <algorithm>
#include <chrono>
#include <cstdio>
#include <cstdlib>
#include <deque>
#include <map>
#include <numeric>
#include <random>
#include <set>
#include <string>
#include <vector>
#include <tpl_dynSetTree.H>
#include <tpl_dynMapTree.H>
#include <tpl_flat_map.H>
#include <tpl_flat_set.H>
#include <tpl_ring_buffer.H>
#include <tpl_small_vector.H>
Include dependency graph for bench_flat_containers.cc:

Go to the source code of this file.

Functions

int main (int argc, char *argv[])
 

Detailed Description

Benchmarks for the flat containers (v5.5.0) against their tree-based Aleph counterparts and the STL.

Compares:

  • FlatSet vs DynSetTree vs std::set (bulk build, incremental insert, lookup, iteration)
  • FlatMap vs DynMapTree vs std::map (same axes)
  • SmallVector vs std::vector (many short-lived small sequences)
  • RingBuffer vs std::deque (bounded sliding window)

This is an informative benchmark (not part of the CA perf gate). Sizes can be tuned via argv: bench_flat_containers [lookup_n] [insert_n].

Definition in file bench_flat_containers.cc.

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)