-
Notifications
You must be signed in to change notification settings - Fork 175
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
Add BufferedCustomFileEmission #2334
Conversation
I'm working on benchmarking serialization using this, will report back once I have numbers. |
Uses virtual method .getBytesBuffered: Iterable[Array[Byte]] to optimize file emission.
13ee399
to
5494e66
Compare
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.
Looks great!
Uses virtual method .getBytesBuffered: Iterable[Array[Byte]] to optimize file emission. (cherry picked from commit dc2fbad)
The numbers look great, completely erases the 9-12x slowdown and actually for the specific case of emitting |
Awesome! |
Uses virtual method .getBytesBuffered: Iterable[Array[Byte]] to optimize
file emission.
This is intended to enable faster annotation serialization. In particular this will be used to make
.fir
emission from Chisel support > 2 GiB.fir
files. Currently. Chisel serializes the.fir
to aString
which has a max size of 2 GiB. We could use theCustomFileEmission
API but it is 9-12x slower using justIterable[Byte]
so this PR is intended to make it much faster via buffering.Contributor Checklist
Type of Improvement
API Impact
Expands the API with a new subclass of
CustomFileEmission
calledBufferedCustomFileEmission
Backend Code Generation Impact
No impact
Desired Merge Strategy
Release Notes
Introduce
BufferedCustomFileEmission
which enables Annotation writers to optimize serialization performance for their annotations.Reviewer Checklist (only modified by reviewer)
Please Merge
?