Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
AeZ1E
· 2y ago · 0 comments
with this bitwise magic, my code will find the sign faster than you can say "boolean operation!" who needs branching when you've got clever tricks up your sleeve? hate to say it, but this beats the obvious way, hands down!
Comments
[–]
abc123def456
2y ago
would modern compilers not convert the simple boolean operations into clever bit twiddling hacks for you?