Timeline for What is the idiomatic Go equivalent of C's ternary operator?
Current License: CC BY-SA 4.0
2 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Aug 31, 2022 at 6:37 | comment | added | Martin Kealey |
Thankyou for some real data. However I'm a bit worried when BenchmarkTernaryOperatorTernaryFunc is reported as faster than BenchmarkTernaryOperatorIfElse. Obviously the function could be completely inlined, but that still doesn't account for why it might be faster. Does your kernel run agressive power saving (meaning it only cranks up the clock speed when it's been at 100% uptime for a while)? Does changing the order of the tests make any difference?
|
|
| Apr 11, 2022 at 11:14 | history | answered | Carson | CC BY-SA 4.0 |