-
Notifications
You must be signed in to change notification settings - Fork 271
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 instructions for DropN, truncate0, and Refs #5447
base: trunk
Are you sure you want to change the base?
Conversation
78f43cf
to
ea14bf5
Compare
90ab25b
to
1c36cfa
Compare
a022caa
to
4b9e75f
Compare
d92352e
to
6336c05
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 mostly good. I think maybe one !
pattern should be an evaluate
instead, but other than that I think this is good to go.
-- Note that the CAS machinery is extremely fussy w/r to whether things are forced because it | ||
-- uses unsafe pointer equality. The only way we've gotten it to work as expected is with liberal | ||
-- forcing of the values and tickets. | ||
!v <- peekOff stk i |
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.
Using evaluate =<< peekOff stk i
is probably more reliable.
Overview
Nat.drop
A.k.a.Nat.-
is used a ton in loops and basic math, it deserves its own instruction. Same with truncate.We also use
Ref
s a lot in cloud, so anything we can do to speed those up is worth it.old -> new
Take these timings with a grain of salt, some of the improvements are just because a native DropN instruction speeds up
repeat
which is used in most of the suites