-
Notifications
You must be signed in to change notification settings - Fork 201
Simplify and rename Stackmap::from_vec
#1032
Simplify and rename Stackmap::from_vec
#1032
Conversation
I think so. |
This is really good code! I like the change from float -> int operations and the use of chunks for the vector. I bet this is more performant too, since it avoids bounds checks. The only thing is... the method name |
@vitiral what name do you propose then? I think about |
|
@bjorn3 IMHO, |
it is a constructor. If there were overloading you would just use |
Stackmap::from_vec
Stackmap::from_vec
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.
Nice simplification.
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.
Looking great, thanks a lot! It's a sweet simplification.
(I'll squash before merging; in general we try to keep commits "atomic" (= do one logical thing, passes test in isolation) so as to keep git bisection trivial. No worries about not doing so this time, just wanted to let you know for next time :)) |
Functionality is preserved, all tests pass.
It is unclear if this method really should take
&Vec<bool>
rather than&[bool]
. Should I make this change as well?