Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(divan_compat): support types and mange types and args in codspeed uri #72

Merged
merged 8 commits into from
Feb 12, 2025

Conversation

GuillaumeLagrange
Copy link
Contributor

@GuillaumeLagrange GuillaumeLagrange commented Feb 7, 2025

Wall time terminal output

  [cargo-codspeed] Measurement mode: Walltime
  Collected 4 benchmark suite(s) to run
  Running codspeed-divan-compat basic_example
  Timer precision: 36 ns
  basic_example  fastest       │ slowest       │ median        │ mean          │ samples │ iters
  ├─ fibo_10     1.752 ns      │ 1.763 ns      │ 1.757 ns      │ 1.757 ns      │ 100     │ 204800
  ╰─ fibo_500    446.8 ns      │ 447.6 ns      │ 446.8 ns      │ 446.9 ns      │ 100     │ 1600
  Done running basic_example
  Running codspeed-divan-compat-examples sort
  Timer precision: 36 ns
  sort                 fastest       │ slowest       │ median        │ mean          │ samples │ iters
  ├─ random                          │               │               │               │         │
  │  ├─ sort           4.865 ms      │ 5.049 ms      │ 4.894 ms      │ 4.896 ms      │ 100     │ 100
  │  │                 max alloc:    │               │               │               │         │
  │  │                   1           │ 1             │ 1             │ 1             │         │
  │  │                   400 KB      │ 400 KB        │ 400 KB        │ 400 KB        │         │
  │  │                 alloc:        │               │               │               │         │
  │  │                   1           │ 1             │ 1             │ 1             │         │
  │  │                   400 KB      │ 400 KB        │ 400 KB        │ 400 KB        │         │
  │  │                 dealloc:      │               │               │               │         │
  │  │                   1           │ 1             │ 1             │ 1             │         │
  │  │                   400 KB      │ 400 KB        │ 400 KB        │ 400 KB        │         │
  │  ╰─ sort_unstable  3.323 ms      │ 3.359 ms      │ 3.337 ms      │ 3.338 ms      │ 100     │ 100
  ╰─ sorted                          │               │               │               │         │
     ├─ sort           137.2 µs      │ 152.4 µs      │ 137.5 µs      │ 138.1 µs      │ 100     │ 100
     │                 max alloc:    │               │               │               │         │
     │                   1           │ 1             │ 1             │ 1             │         │
     │                   400 KB      │ 400 KB        │ 400 KB        │ 400 KB        │         │
     │                 alloc:        │               │               │               │         │
     │                   1           │ 1             │ 1             │ 1             │         │
     │                   400 KB      │ 400 KB        │ 400 KB        │ 400 KB        │         │
     │                 dealloc:      │               │               │               │         │
     │                   1           │ 1             │ 1             │ 1             │         │
     │                   400 KB      │ 400 KB        │ 400 KB        │ 400 KB        │         │
     ╰─ sort_unstable  109.7 µs      │ 200.7 µs      │ 109.7 µs      │ 111.7 µs      │ 100     │ 100
  Done running sort
  Running codspeed-divan-compat-examples time
  Timer precision: 36 ns
  time                 fastest       │ slowest       │ median        │ mean          │ samples │ iters
  ├─ duration_since                  │               │               │               │         │
  │  ├─ instant        10.28 ns      │ 10.58 ns      │ 10.4 ns       │ 10.4 ns       │ 100     │ 51200
  │  ├─ system_time    13.37 ns      │ 13.82 ns      │ 13.79 ns      │ 13.65 ns      │ 100     │ 51200
  │  ╰─ tsc (aarch64)  0.269 ns      │ 0.295 ns      │ 0.281 ns      │ 0.282 ns      │ 100     │ 409600
  ╰─ now                             │               │               │               │         │
     ├─ instant        38.12 ns      │ 38.22 ns      │ 38.22 ns      │ 38.21 ns      │ 100     │ 12800
     ├─ system_time    38.12 ns      │ 38.22 ns      │ 38.22 ns      │ 38.21 ns      │ 100     │ 12800
     ╰─ tsc (aarch64)  3.064 ns      │ 3.087 ns      │ 3.076 ns      │ 3.073 ns      │ 100     │ 102400
  Done running time
  Running codspeed-divan-compat-examples math
  Timer precision: 36 ns
  math                         fastest       │ slowest       │ median        │ mean          │ samples │ iters
  ├─ add                       2.625 ns      │ 2.642 ns      │ 2.625 ns      │ 2.627 ns      │ 100     │ 204800
  ├─ div                       3.509 ns      │ 12.41 ns      │ 3.521 ns      │ 3.608 ns      │ 100     │ 102400
  ├─ mul                       2.625 ns      │ 2.631 ns      │ 2.625 ns      │ 2.627 ns      │ 100     │ 204800
  ├─ rem                       3.509 ns      │ 3.522 ns      │ 3.521 ns      │ 3.518 ns      │ 100     │ 102400
  ├─ sub                       (ignored)     │               │               │               │         │
  ╰─ fibonacci                               │               │               │               │         │
     ├─ iterative                            │               │               │               │         │
     │  ├─ 0                   1.669 ns      │ 1.769 ns      │ 1.675 ns      │ 1.674 ns      │ 100     │ 204800
     │  ├─ 5                   7.47 ns       │ 7.587 ns      │ 7.494 ns      │ 7.493 ns      │ 100     │ 51200
     │  ├─ 10                  16.7 ns       │ 16.89 ns      │ 16.7 ns       │ 16.72 ns      │ 100     │ 25600
     │  ├─ 20                  39.43 ns      │ 39.72 ns      │ 39.53 ns      │ 39.5 ns       │ 100     │ 12800
     │  ╰─ 30                  50.78 ns      │ 50.88 ns      │ 50.87 ns      │ 50.83 ns      │ 100     │ 12800
     ├─ recursive                            │               │               │               │         │
     │  ├─ 0                   1.904 ns      │ 1.91 ns       │ 1.904 ns      │ 1.905 ns      │ 100     │ 204800
     │  ├─ 5                   33.9 ns       │ 34 ns         │ 33.9 ns       │ 33.94 ns      │ 100     │ 12800
     │  ├─ 10                  398.8 ns      │ 409.4 ns      │ 399.6 ns      │ 402.8 ns      │ 100     │ 1600
     │  ├─ 20                  49.73 µs      │ 57.63 µs      │ 49.76 µs      │ 49.84 µs      │ 100     │ 100
     │  ╰─ 30                  6.114 ms      │ 6.231 ms      │ 6.171 ms      │ 6.167 ms      │ 100     │ 100
     ╰─ recursive_memoized                   │               │               │               │         │
        ├─ BTreeMap<u64, u64>                │               │               │               │         │
        │  ├─ 0                14.5 ns       │ 14.54 ns      │ 14.5 ns       │ 14.51 ns      │ 100     │ 25600
        │  ├─ 5                184.7 ns      │ 439 ns        │ 185.1 ns      │ 187.5 ns      │ 100     │ 3200
        │  ├─ 10               516.6 ns      │ 564.6 ns      │ 519.6 ns      │ 520 ns        │ 100     │ 800
        │  ├─ 20               1.721 µs      │ 2.285 µs      │ 1.751 µs      │ 1.757 µs      │ 100     │ 200
        │  ╰─ 30               2.795 µs      │ 4.355 µs      │ 2.807 µs      │ 2.836 µs      │ 100     │ 100
        ╰─ HashMap<u64, u64>                 │               │               │               │         │
           ├─ 0                15.81 ns      │ 15.86 ns      │ 15.81 ns      │ 15.83 ns      │ 100     │ 25600
           ├─ 5                575.1 ns      │ 600.6 ns      │ 576.6 ns      │ 577.2 ns      │ 100     │ 800
           ├─ 10               1.541 µs      │ 1.628 µs      │ 1.553 µs      │ 1.555 µs      │ 100     │ 400
           ├─ 20               3.275 µs      │ 4.523 µs      │ 3.311 µs      │ 3.346 µs      │ 100     │ 100
           ╰─ 30               5.687 µs      │ 9.023 µs      │ 5.783 µs      │ 5.847 µs      │ 100     │ 100

Copy link

codspeed-hq bot commented Feb 7, 2025

CodSpeed Instrumentation Performance Report

Merging #72 will degrade performances by 3.14%

Comparing fix-benchmark-names (3a1c877) with main (95d6f89)

Summary

❌ 2 regressions
✅ 52 untouched benchmarks
🆕 37 new benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
b 2.8 µs 2.8 µs -3.08%
build_vec 2.7 µs 2.8 µs -3.14%
🆕 fibo_10 N/A 90 ns N/A
🆕 fibo_500 N/A 286.9 ns N/A
🆕 mut_borrow N/A 895.8 ns N/A
🆕 add N/A 91.4 ns N/A
🆕 div N/A 124.2 ns N/A
🆕 iterative N/A 119.2 ns N/A
🆕 iterative N/A 175.8 ns N/A
🆕 iterative N/A 206.4 ns N/A
🆕 iterative N/A 236.9 ns N/A
🆕 iterative N/A 160.6 ns N/A
🆕 recursive N/A 211.1 ns N/A
🆕 recursive N/A 932.5 ns N/A
🆕 recursive N/A 79.1 µs N/A
🆕 recursive N/A 9.7 ms N/A
🆕 recursive N/A 291.1 ns N/A
🆕 recursive_memoized[BTreeMap<u64, u64>, 0] N/A 371.7 ns N/A
🆕 recursive_memoized[BTreeMap<u64, u64>, 10] N/A 2.9 µs N/A
🆕 recursive_memoized[BTreeMap<u64, u64>, 20] N/A 6.7 µs N/A
... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.

@GuillaumeLagrange
Copy link
Contributor Author

@art049 no idea why there are changes in the bench perf here, I did not touch this code 😬

Copy link

codspeed-hq bot commented Feb 7, 2025

CodSpeed Walltime Performance Report

Merging #72 will degrade performances by 20.05%

Comparing fix-benchmark-names (3a1c877) with main (95d6f89)

Summary

❌ 1 regressions
✅ 1 untouched benchmarks
🆕 35 new benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
fibo_10 3.6 µs 4.5 µs -20.05%
🆕 mut_borrow N/A 4 µs N/A
🆕 add N/A 4.5 µs N/A
🆕 div N/A 3.6 µs N/A
🆕 iterative N/A 3.4 µs N/A
🆕 iterative N/A 4.3 µs N/A
🆕 iterative N/A 5 µs N/A
🆕 iterative N/A 6.5 µs N/A
🆕 iterative N/A 4 µs N/A
🆕 recursive N/A 3.9 µs N/A
🆕 recursive N/A 6.4 µs N/A
🆕 recursive N/A 49.6 µs N/A
🆕 recursive N/A 6.1 ms N/A
🆕 recursive N/A 4.3 µs N/A
🆕 recursive_memoized[BTreeMap<u64, u64>, 0] N/A 3.7 µs N/A
🆕 recursive_memoized[BTreeMap<u64, u64>, 10] N/A 4 µs N/A
🆕 recursive_memoized[BTreeMap<u64, u64>, 20] N/A 3.5 µs N/A
🆕 recursive_memoized[BTreeMap<u64, u64>, 30] N/A 2.9 µs N/A
🆕 recursive_memoized[BTreeMap<u64, u64>, 5] N/A 5.8 µs N/A
🆕 recursive_memoized[HashMap<u64, u64>, 0] N/A 4 µs N/A
... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.

Copy link
Member

@art049 art049 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great if you can add the example benches to the runs so we can check the results

@GuillaumeLagrange GuillaumeLagrange force-pushed the fix-benchmark-names branch 5 times, most recently from 35896ec to ff73718 Compare February 7, 2025 15:09
@GuillaumeLagrange GuillaumeLagrange changed the title Manage args in cospeed URI feat(divan_compat): support types and mange types and args in codspeed uri Feb 11, 2025
@GuillaumeLagrange GuillaumeLagrange merged commit 3a1c877 into main Feb 12, 2025
5 of 6 checks passed
@GuillaumeLagrange GuillaumeLagrange deleted the fix-benchmark-names branch February 12, 2025 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants