-
Notifications
You must be signed in to change notification settings - Fork 286
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
Remove tag from RuntimeValue #133
Remove tag from RuntimeValue #133
Conversation
src/value.rs
Outdated
@@ -28,6 +29,93 @@ pub enum RuntimeValue { | |||
F64(F64), | |||
} | |||
|
|||
#[derive(Copy, Clone, Debug, PartialEq, Default)] | |||
pub(crate) struct RuntimeValueInternal(pub u64); |
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.
Can you add a brief comment what is going on here and why?
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.
Great point, this is definitely not self-explanatory
Could you rebase this please? |
Per mine and @pepyakin's discussion in private, we seem to get such a huge improvement on the factorial benchmarks because zeroing allocation can use |
9f5cd78
to
e73fb3a
Compare
Could you rebase this? |
@pepyakin After this rebase can you just squash+merge (unless it's incorrect of course) because I have to manually merge every time because all our changes touch |
yeah sure! Just ping me in every possible way you can whenever you've done with rebasing : ) |
e73fb3a
to
d3593c9
Compare
… do `pub(crate)`
d3593c9
to
24d69b5
Compare
Perfect, thank you! |
* Remove tag from runtime value * Add explanation of `RuntimeValueInternal`, move it so I don't need to do `pub(crate)`
This closes #99. Benchcmp results:
All tests still pass. I expect most of these improvements are due to the fact that we double our cache efficiency by halving the size of
RuntimeValue
(sinceRuntimeValue
includes au64
, its tag must be padded to 64 bits, making the whole value 2x the size of a u64). However, some improvements may be due to the fact that we remove some validity checking on function arguments. This was duplicated effort anyway, since that is already checked statically.