-
-
Notifications
You must be signed in to change notification settings - Fork 314
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
Finish migrating gitoxide from nom 7 to winnow 0.5 #956
Conversation
Since I'm seeing local test failures, I'm rely on CI for the cases I'm not easily hitting due to other errors |
Huh, mac-fast is failing in CI differently than local (in |
So good to see this happening, and it's basically done already and working in the first stage :)!
I'd love to treat this as a bug, knowing that there were problems with
It looks like everything passed now except for |
Just a quick note before I forget or it becomes a surprise later: d3f65d8 will be conflicting, and I recommend rebasing onto |
Already rebased and working on cleaning it up right now |
I am cheering you on from the side-lines, the goal is already in sight :)! |
9abdc47
to
1b82390
Compare
89053a2
to
f1088a8
Compare
This is intended to make the winnow 0.5 transition easier
This is prep for switching from `VerboseError` to `ContextError`
With winnow-rs/winnow#316 and winnow-rs/winnow#317 merged into 0.5 and backported to 0.4 and 0.3 TagRefIter(sig) And for across-the-board $ cargo bench -p [email protected] --bench decode-objects
Running benches/decode_objects.rs (target/release/deps/decode_objects-2030aacefe52a773)
Gnuplot not found, using plotters backend
CommitRef(sig) time: [536.77 ns 537.97 ns 539.26 ns]
change: [-34.148% -33.943% -33.752%] (p = 0.00 < 0.05)
Performance has improved.
Found 7 outliers among 100 measurements (7.00%)
7 (7.00%) high mild
CommitRefIter(sig) time: [648.26 ns 662.31 ns 684.63 ns]
change: [-30.898% -29.723% -28.166%] (p = 0.00 < 0.05)
Performance has improved.
Found 9 outliers among 100 measurements (9.00%)
1 (1.00%) high mild
8 (8.00%) high severe
TagRef(sig) time: [170.18 ns 170.50 ns 170.86 ns]
change: [+4.3542% +4.7672% +5.1841%] (p = 0.00 < 0.05)
Performance has regressed.
Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high severe
TagRefIter(sig) time: [174.34 ns 174.55 ns 174.77 ns]
change: [+1.5350% +2.1648% +2.7832%] (p = 0.00 < 0.05)
Performance has regressed.
Found 4 outliers among 100 measurements (4.00%)
1 (1.00%) low mild
2 (2.00%) high mild
1 (1.00%) high severe
TreeRef(sig) time: [101.54 ns 101.70 ns 101.88 ns]
change: [+7.2389% +7.5092% +7.7863%] (p = 0.00 < 0.05)
Performance has regressed.
Found 2 outliers among 100 measurements (2.00%)
2 (2.00%) high mild
TreeRefIter(sig) time: [46.948 ns 46.997 ns 47.054 ns]
change: [-6.4018% -6.2109% -5.9962%] (p = 0.00 < 0.05)
Performance has improved.
Found 11 outliers among 100 measurements (11.00%)
8 (8.00%) high mild
3 (3.00%) high severe Seeing some of those lows, I feel like we could do better |
It's strange that these benchmark improvements seem to have no bearing on the real-world test.
(The cache was hot for both runs and I made sure the the I am absolutely puzzled by that. Is this something you can reproduce? |
$ git switch main
$ cd ..
$ cp -r gitoxide gitoxide1
$ cd gitoxide1
$ git switch winnow
$ cd ../linux
$
$ cargo run --release --manifest-path ../gitoxide/Cargo.toml --bin ein -- t h
$ cargo run --release --manifest-path ../gitoxide/Cargo.toml --bin ein -- t h
$ cargo run --release --manifest-path ../gitoxide/Cargo.toml --bin ein -- t h
$
$ cargo run --release --manifest-path ../gitoxide1/Cargo.toml --bin ein -- t h
$ cargo run --release --manifest-path ../gitoxide1/Cargo.toml --bin ein -- t h
$ cargo run --release --manifest-path ../gitoxide1/Cargo.toml --bin ein -- t h I found that both |
Thank you, this probably means that it's an issue with the way it is compiled. On x86 there seem to be optimizations that don't kick in anymore on ARM64. What's more surprising is that after a But here it comes. The version I produced with Now, after The binary sizes are similar, so there must be something about |
Looking at the code, I'm not seeing |
I didn't see it that with But then it struck me: I think this case is solved now 🎉. |
Performance-wise, it seems like the benchmarks were a great indicator after all and by the looks of it (comparing
Thus I think performance won't be preventing a merge anymore, quite the opposite :). |
I leave it to you. For me, there are more things I want to look at but that can be done independent of this being merged. |
I dropped b7ee9a1 because it just seemed to slow things down (oddly enough) |
Great, then I will work on merging this PR now as it seems ready in every way, while looking forward to seeing those ideas of yours to come to fruition. Before I go: I have a feeling your CPU might be twice as fast as mine. With that said, what's the commits/s you get when running |
$ cargo run --release --manifest-path ../gitoxide/Cargo.toml --bin ein -- t h
Finished release [optimized] target(s) in 0.09s
Running `/home/epage/src/personal/gitoxide/target/release/ein t h`
14:45:32 traverse commit graph done 1.1M commits in 8.30s (131.6k commits/s)
14:45:32 estimate-hours Extracted and organized data from 1092424 commits in 13.815333ms (79073304 commits/s)
total hours: 1050880.75
total 8h days: 131360.09
total commits = 1092424
total authors: 29848
total unique authors: 22742 (23.81% duplication) |
Aw, snap, I hoped to see something in the 200k range. Of course, the workload is bound by zlib performance and parsing isn't holding anything back here, so improvements are probably out of range unless object decompression gets faster over time. Oh well, I keep an eye on that number with a new baseline of ~140k commits/s expecting it to go up over time. I guess the real benchmark is against
Interestingly, besides memory usage, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a million for working on this topic! It's a great outcome and I couldn't have wished for more.
Follow up to #948 and #951
gix-actor
,gix-object
,gix-ref
, andgix-testtools
are interrelated, so this does it all at onceThings left out
winnow
from the API of the above packagesfrom_bytes
functions to usingparse
instead of (the implied)parse_next
BREAKING CHANGE:
nom
, and nowwinnow
, is exposed in the public API of some of these packages