Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
misev
56 days ago
|
parent
|
context
|
favorite
| on:
Your code is fast if you're lucky
You could rewrite it to
int* ptr = ((v != 0) * lwr) + ((v == 0) * rwr);
I doubt it would be faster than the ternary though.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: