-
Notifications
You must be signed in to change notification settings - Fork 39
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
jets: refactors and optimizes tree-math jets #397
Conversation
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.
LGTM now
This reverts commit b256c87.
If urbit/urbit#6819 is ever restored, 2d696e3 should be reverted. |
c13a351
to
de74b25
Compare
61e7c34
to
562bfac
Compare
pkg/noun/jets/c/mas.c
Outdated
u3i_slab sab_u; | ||
u3i_slab_from(&sab_u, a, 0, --b_w); | ||
|
||
sab_u.buf_w[(b_w >> 5)] &= ((c3_w)1 << (b_w & 31)) - 1; |
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.
NB: slab_from rounds up to word boundaries in the slice specified, so we need to mask off any more significant bits than we want.
pkg/noun/jets/c/mas.c
Outdated
sab_u.buf_w[(b_w >> 5)] &= ((c3_w)1 << (b_w & 31)) - 1; | ||
b_w--; | ||
sab_u.buf_w[(b_w >> 5)] |= ((c3_w)1 << (b_w & 31)); |
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.
This mask and store logic is wrong in the boundary condition. @joemfb is going to put masking logic for sub-word blocksizes in u3i_slab_from()
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.
Thanks, this was a great catch
I've updated I've corrected the |
Building on urbit/urbit#6592, this PR adds jets for
+pin
and+hub
. Additionally, it fixes some unsafec3_w
->u3_atom
conversions and optimizes+peg
and+mas
.This is a draft PR as further testing of these changes is still needed.
/cc @eamsden