Skip to content

Conversation

ltratt
Copy link
Member

@ltratt ltratt commented Aug 6, 2020

Needs softdevteam/libgc#19 to be merged first.

At the moment a Val can only be INT or GCBOX, so in cases where we've checked to see if self is an INT, the only remaining case is GCBOX. The locations changed in this commit implicitly checked that self was a GCBOX
twice: by using unsafe gcbox_to_tobj function, we can remove the second (pointless) check. This is a just about measurable improvement on the JSON benchmark at about 1%.

At the moment a `Val` can only be `INT` or `GCBOX`, so in cases where we've
checked to see if `self` is an `INT`, the only remaining case is `GCBOX`. The
locations changed in this commit implicitly checked that `self` was a `GCBOX`
twice: by using unsafe `gcbox_to_tobj` function, we can remove the second
(pointless) check. This is a just about measurable improvement on the JSON
benchmark at about 1%.
@ptersilie
Copy link
Member

Looks good.

@ptersilie
Copy link
Member

bors r+

@bors
Copy link
Contributor

bors bot commented Aug 10, 2020

Build succeeded:

@bors bors bot merged commit c2ffe13 into softdevteam:master Aug 10, 2020
@ltratt ltratt deleted the remove_tobj_calls branch August 11, 2020 10:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants