-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
ANISE dataset performance issues -- breaking change #252
ANISE dataset performance issues -- breaking change #252
Conversation
Could it be an issue of having a SequenceOf within a SequenceOf?
…CRC is meaningless
So far, this proposal leads to a decrease in performance by a factor of five. So this should not be merged as such. I will try to remove the cloning of the data when getting it from the vector, cf. anise/anise/src/structure/dataset/mod.rs Line 234 in 4f901f0
|
The benchmark test was not correct and measured the cost of cloning the Almanac (out of an Arc too). Removing that clone and using the same approach as the other benchmarks led to a significant performance increase as reflected in the updated times above. This performance increase is also seen in Nyx, flamegraphs added here: #248 (comment) |
One of the two MacOS build seems to be dependent on the released version. Not sure why, but I'm not worried about it since it worked on the other MacOS build. |
Summary
Breaking refactoring of the
DataSet
type.This change allocates the data on the heap instead of keeping it "virtually" on the stack. The prior implementation stored the underlying bytes on the heap though (via
Bytes
), so any just-in-time and on the stack operation still read from the heap. This change causes the ANISE binary files from version 0.3 to no longer be compatible. However, it also leads to significant performance improvements, notably when reading frame information.Benchmark from master: https://github.com/nyx-space/anise/actions/runs/9361419937/job/25768385038:
time: [6.9400 µs 6.9446 µs 6.9505 µs]
Benchmark from this branch in test suite:
time: [5.3151 ns 5.3206 ns 5.3268 ns]
Closes #248
Architectural Changes
DataSet
items are decoded only once on load instead of being decoded just-in-time every time they were queried. This leads to 100x improvement in querying time.New Features
No change
Improvements
Significant performance improvements.
Bug Fixes
No change
Testing and validation
Detail the changes in tests, including new tests and validations
Documentation
This PR does not primarily deal with documentation changes.