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
Boxes record for smaller Value enum. #12252
Conversation
I ran the benchmark suit and saw no noticeable slowdown by the indirection of boxing records. |
Mhh we currently don't have any benchmarks for heavy cellpath access or records in general. Probably a gap worth filling. Personally I would like to see the boxing route compared to a move of |
Since this is a performance optimization, it would be great to have a benchmark demonstrating some performance benefit. |
I think if this isn't a big performance regression and it improves memory usage, that would also be a win |
@kubouch I was thinking of trying to add some benchmark for this by generating and accessing records, but I overall think it won't be any significant regression, I think the Mayer win would be that Value goes below 64 bytes and thereby could be loaded in one cache lane, compared to 2. |
I added a small tests creation time, and access time with a simple record of 1-1000 columns Before
After
|
@sholderbach I added benchmark that expand to something like this
And access it with Before
After
It seems the penalty of indirection is hit roughly at 32 nested records but no significant regression bellow that. |
Is this satisfactory, or is additional benchmarks required? |
Seems good to me, there doesn't seem to be many regressions in the cases where it matters (I don't think >32 indirection is that common), and some benchmarks are even slightly faster. |
Thanks for bringing the receipts! |
Only short-term solution Competes with nushell#12305
Only short-term solution Competes with nushell#12305
Description
Boxes
Record
insideValue
to reduce memory usage,Value
goes from72
->56
bytes after this change.User-Facing Changes
Tests + Formatting
After Submitting