Open
Conversation
yegor256
reviewed
Sep 28, 2025
Member
|
@RAprogramm looks good, many thanks! See one comment above. |
Contributor
Author
sodg.rs on 235 is 📦 v0.0.0 via 🦀 v1.90.0 took 3s
0% ❯ critcmp master 235
group 235 master
----- --- ------
add_vertices/10 82.68 576.7±191.73ns 16.5 MElem/sec 1.00 7.0±0.08ns ? ?/sec
add_vertices/100 43.29 3.6±1.29µs 26.3 MElem/sec 1.00 83.7±0.81ns ? ?/sec
add_vertices/1000 25.27 34.8±12.98µs 27.4 MElem/sec 1.00 1375.7±34.55ns ? ?/sec
add_vertices/10000 8.28 202.9±34.95µs 47.0 MElem/sec 1.00 24.5±0.77µs ? ?/sec
bind_edges/10 17.94 783.4±255.89ns 11.0 MElem/sec 1.00 43.7±1.30ns ? ?/sec
bind_edges/100 10.34 5.6±2.16µs 15.8 MElem/sec 1.00 542.9±31.24ns ? ?/sec
bind_edges/200 10.45 10.8±4.23µs 16.5 MElem/sec 1.00 1032.5±77.69ns ? ?/sec
put/10 2.88 999.2±175.27ns 9.5 MElem/sec 1.00 346.5±21.93ns ? ?/sec
put/100 2.05 6.9±1.34µs 13.8 MElem/sec 1.00 3.4±0.18µs ? ?/sec
put/1000 1.61 53.6±9.49µs 17.8 MElem/sec 1.00 33.3±2.18µs ? ?/sec
put/10000 1.22 488.4±114.29µs 19.5 MElem/sec 1.00 400.6±59.67µs ? ?/sec
put_and_data/10 2.20 1074.9±174.65ns 8.9 MElem/sec 1.00 488.0±7.42ns ? ?/sec
put_and_data/100 1.42 6.3±0.61µs 15.1 MElem/sec 1.00 4.4±0.08µs ? ?/sec
put_and_data/1000 2.26 104.4±41.34µs 9.1 MElem/sec 1.00 46.2±3.28µs ? ?/sec
put_and_data/10000 1.02 646.7±143.22µs 14.7 MElem/sec 1.00 636.8±111.52µs ? ?/sec |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I ran
critcmp master 235to evaluate the performance impact of #235. The table shows large slowdowns on my branch. However, this is caused by benchmark methodology, not by the implementation itself.Why the numbers are misleading
masterbenches mutate shared state insideb.iter(..)and do not declare throughput, socritcmpprints? ?/sec. Each iteration does a different amount of work and the optimizer may elide parts of the hot path.235the benches useiter_batchedandThroughput::Elements(..), so each iteration does a fixed amount of work andcritcmpreports ops/sec. Absolute times are higher (expected), because the per-iteration workload is no longer “growing.”Action plan
First, land a minimal patch to
benches/bench.rsthat moves setup out of the hot path and sets throughput (no API changes).Establish a clean baseline on
master:Re-run on branch
235:Compare apples to apples:
This will produce meaningful deltas (time and ops/sec) and remove artifacts from the old methodology.
Note
I can submit the minimal benchmark patch as a separate PR so we can proceed with fair measurements.