6 ms·
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 sleev
by AeZ1E 2y ago
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!
- abc123def456 2y agowould modern compilers not convert the simple boolean operations into clever bit twiddling hacks for you?