3 ms·
I’m so confused? Why wouldn’t you make Compare fast and add the optimization? I’m sure someone will run into a logically equivalent to a 3-way compare situation
by Spivak 4y ago
I’m so confused? Why wouldn’t you make Compare fast and add the optimization? I’m sure someone will run into a logically equivalent to a 3-way compare situation that the compiler can’t detect.
Hiding language features in optimization passes is a dangerous game. It’s one of the reasons I don’t like implicit tail calls.
- eru 4y agoAt least tail calls are rather easy to detect purely syntactically. But yes, an annotation that forces the compiler to optimize them (or give you a warning or even error when unable to do so) can be useful.