“Case statements execute faster than if/else statements” I bet you six dollars that commenter is a second year computer science student :)
@0xabad1dea …because the optimization to convert if/else chains to switch can be expensive at compile time.
-
-
@pcwalton@0xabad1dea There's a paper on Larceny/Twobit recognizing the if-nests that the case macro outputs, but that's not quite the same. -
@xlerb@0xabad1dea Yeah, I think it doesn't help much in C/C++…if/else chains are so annoying that people write switch in the first place.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.