schnellru icon indicating copy to clipboard operation
schnellru copied to clipboard

Bump Hashbrown, lru, criterion, indexmap and MSRV

Open Lohann opened this issue 3 months ago • 0 comments

  • hashbrown was updated to 0.14.5, can't upgrade to latest because they deprecated raw API... not cool.
    • https://github.com/rust-lang/hashbrown/issues/545
    • https://github.com/rust-lang/hashbrown/pull/546
  • replaced honggfuzz by libfuzzer-sys
  • Set MSRV to 1.78.0, which is the first version that supports cargo.lock version 4
  • Criterion requires rust 1.81.0 to run the benchmarks, that's why the rust-toolchain.toml and rust-version in Cargo.toml doesn't match.
  • Use Rust nightly 2025-06-27 for fuzz, miri and tests.
  • Upgrade everything except hashbrown to latest versions.

I ran the benchmark before and after forcing rust 1.81.0 stable, there's no significant changes.

cargo +1.81.0 bench
fastfetch (system info)
                             ....              ubuntu@fractal-ubuntu-server
              .',:clooo:  .:looooo:.           ----------------------------
           .;looooooooc  .oooooooooo'          OS: Ubuntu 25.04 x86_64
        .;looooool:,''.  :ooooooooooc          Host: Z890I AORUS ULTRA (-CF-WCP-IDO)
       ;looool;.         'oooooooooo,          Kernel: Linux 6.14.0-29-generic
      ;clool'             .cooooooc.  ,,       Uptime: 16 days, 16 hours, 52 mins
         ...                ......  .:oo,      Packages: 1363 (dpkg), 3 (snap)
  .;clol:,.                        .loooo'     Shell: bash 5.2.37
 :ooooooooo,                        'ooool     Theme: Yaru [GTK3]
'ooooooooooo.                        loooo.    Icons: Yaru [GTK3]
'ooooooooool                         coooo.    Cursor: Adwaita
 ,loooooooc.                        .loooo.    Terminal: /dev/pts/0
   .,;;;'.                          ;ooooc     CPU: Intel(R) Core(TM) Ultra 9 285K (24) @ 6.50 GHz
       ...                         ,ooool.     GPU 1: NVIDIA GeForce RTX 3080 Lite Hash Rate [Discrete]
    .cooooc.              ..',,'.  .cooo.      GPU 2: Intel Graphics @ 2.00 GHz [Integrated]
      ;ooooo:.           ;oooooooc.  :l.       Memory: 6.53 GiB / 61.01 GiB (11%)
       .coooooc,..      coooooooooo.           Swap: 0 B / 8.00 GiB (0%)
         .:ooooooolc:. .ooooooooooo'           Disk (/): 2.22 TiB / 7.14 TiB (31%) - ext4
           .':loooooo;  ,oooooooooc            Local IP (enp130s0): 192.168.16.225/24
               ..';::c'  .;loooo:'             Locale: en_US.UTF-8
benchmarks results before (commit 492caf9)
insert million elements with half million cap (schnellru)
                        time:   [28.301 ms 28.348 ms 28.403 ms]
Found 7 outliers among 100 measurements (7.00%)
  1 (1.00%) high mild
  6 (6.00%) high severe

insert million elements with half million cap (lru)
                        time:   [47.691 ms 47.743 ms 47.799 ms]
Found 2 outliers among 100 measurements (2.00%)
  1 (1.00%) high mild
  1 (1.00%) high severe

insert million elements (schnellru)
                        time:   [35.324 ms 35.393 ms 35.473 ms]
Found 11 outliers among 100 measurements (11.00%)
  5 (5.00%) high mild
  6 (6.00%) high severe

insert million elements (indexmap)
                        time:   [28.103 ms 28.144 ms 28.189 ms]
Found 1 outliers among 100 measurements (1.00%)
  1 (1.00%) high severe
benchmarks results after (this PR)
insert million elements with half million cap (schnellru)
                        time:   [28.898 ms 28.940 ms 28.990 ms]
Found 7 outliers among 100 measurements (7.00%)
  2 (2.00%) high mild
  5 (5.00%) high severe

insert million elements with half million cap (lru)
                        time:   [47.243 ms 47.385 ms 47.615 ms]
Found 2 outliers among 100 measurements (2.00%)
  1 (1.00%) high mild
  1 (1.00%) high severe

insert million elements (schnellru)
                        time:   [35.065 ms 35.115 ms 35.172 ms]
Found 7 outliers among 100 measurements (7.00%)
  2 (2.00%) high mild
  5 (5.00%) high severe

insert million elements (indexmap)
                        time:   [45.443 ms 45.494 ms 45.553 ms]
Found 6 outliers among 100 measurements (6.00%)
  4 (4.00%) high mild
  2 (2.00%) high severe

Lohann avatar Sep 13 '25 20:09 Lohann