adding benchmarks and readme

This commit is contained in:
Jidong Xiao
2025-03-11 00:56:33 -04:00
committed by JamesFlare1212
parent 186a7e60ea
commit 95d9bb50ca
5 changed files with 149 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
#include <iostream>
#include <map>
int main() {
const int N = 1000000;
std::map<int, int> m;
// fill the map with some values
for (int i = 0; i < N; ++i) {
m[i] = i;
}
// erase by key
for (int i = 0; i < N; ++i) {
m.erase(i);
}
return 0;
}