Skip to content

Commit

Permalink
cleaner script
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Apr 25, 2023
1 parent 9fd0c67 commit 7d24bde
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
22 changes: 11 additions & 11 deletions README.md
Expand Up @@ -64,21 +64,21 @@ while the numbers below 1.0 demonstrate performance loss.
<!-- benchmark -->
| | 2 | 4 | 8 | 16 | 32 | 64 | 128 |
| --- | --: | --: | --: | --: | --: | --: | --: |
| `hashbrown::HashMap` | 16.12 | 3.47 | 2.34 | 1.24 | 0.51 | 0.26 | 0.12 |
| `indexmap::IndexMap` | 13.98 | 6.07 | 4.28 | 2.26 | 1.15 | 0.57 | 0.27 |
| `linear_map::LinearMap` | 2.22 | 0.68 | 0.61 | 0.56 | 0.48 | 0.60 | 0.49 |
| `linked_hash_map::LinkedHashMap` | 26.38 | 7.67 | 5.18 | 3.24 | 1.46 | 0.77 | 0.35 |
| `litemap::LiteMap` | 4.97 | 1.48 | 1.19 | 0.86 | 0.46 | 0.29 | 0.18 |
| `hashbrown::HashMap` | 11.12 | 2.44 | 1.63 | 0.98 | 0.39 | 0.17 | 0.07 |
| `indexmap::IndexMap` | 13.00 | 5.83 | 3.20 | 1.97 | 0.76 | 0.33 | 0.16 |
| `linear_map::LinearMap` | 1.98 | 0.62 | 0.61 | 0.61 | 0.44 | 0.41 | 0.43 |
| `linked_hash_map::LinkedHashMap` | 36.84 | 11.39 | 4.83 | 3.01 | 1.52 | 0.70 | 0.33 |
| `litemap::LiteMap` | 1.97 | 1.10 | 0.84 | 0.71 | 0.41 | 0.26 | 0.19 |
| `micromap::Map` 馃憤 | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 | 1.00 |
| `nohash_hasher::BuildNoHashHasher` | 12.07 | 3.58 | 2.72 | 1.01 | 0.48 | 0.25 | 0.11 |
| `rustc_hash::FxHashMap` | 12.06 | 3.34 | 2.25 | 1.36 | 0.48 | 0.25 | 0.12 |
| `std::collections::BTreeMap` | 22.61 | 4.80 | 3.38 | 2.49 | 1.22 | 0.60 | 0.35 |
| `std::collections::HashMap` | 18.61 | 5.67 | 4.02 | 2.24 | 1.13 | 0.56 | 0.26 |
| `tinymap::array_map::ArrayMap` | 2.00 | 2.32 | 2.15 | 2.26 | 2.28 | 2.30 | 2.01 |
| `nohash_hasher::BuildNoHashHasher` | 11.46 | 2.34 | 1.69 | 0.62 | 0.28 | 0.12 | 0.06 |
| `rustc_hash::FxHashMap` | 11.85 | 2.27 | 1.70 | 0.71 | 0.27 | 0.13 | 0.06 |
| `std::collections::BTreeMap` | 30.43 | 4.81 | 2.90 | 2.42 | 1.06 | 0.48 | 0.26 |
| `std::collections::HashMap` | 21.49 | 9.85 | 4.48 | 2.14 | 0.87 | 0.66 | 0.26 |
| `tinymap::array_map::ArrayMap` | 1.50 | 1.87 | 2.19 | 2.72 | 2.63 | 2.55 | 2.47 |

The experiment [was performed](https://github.com/yegor256/micromap/actions/workflows/benchmark.yml) on 25-04-2023.
There were 1000000 repetition cycles.
The entire benchmark took 352s.
The entire benchmark took 159s.

<!-- benchmark -->

Expand Down
3 changes: 2 additions & 1 deletion rebuild_benchmark.sh
Expand Up @@ -11,6 +11,7 @@ sed -E -i 's/\[dev-dependencies\]//g' Cargo.toml
micromap="micromap::Map"
capacities="2 4 8 16 32 64 128"
cycles=1000000
first=$(echo ${capacities} | cut -f1 -d' ')

rm -rf target/benchmark
mkdir -p target/benchmark
Expand All @@ -33,7 +34,7 @@ lapsed=$SECONDS
echo -n " --: |"
done
echo ''
maps=$(cut -f 1 target/benchmark/2.out)
maps=$(cut -f 1 target/benchmark/${first}.out)
for map in ${maps}; do
echo -n "| \`${map}\`"
if [ "${map}" == "${micromap}" ]; then
Expand Down

0 comments on commit 7d24bde

Please sign in to comment.