News for hackers. Stuff that matters.
Re:Brilliant or insane code? by icebraining on Sunday September 01, 2013 @08:27AM (#6310096)
Yeah, but unlike the hack in the article, the more readable version of that code,

  "Thing 1" if some_boolean else "Thing 2"
is also almost twice as fast(775 vs 1340 ns, on my machine).
Re:Brilliant or insane code? by StavrosK on Sunday September 01, 2013 @08:42AM (#6310141)
I was more posting it for the "cute hack" value, rather than speed. Speed was significant in the post because the author needed their library to be fast.