On 09/23/2017 11:46 PM, user1234 wrote:
"if (__ctfe) {}" is a test happening at runtime. Both the if and the else branches got compiled, this implies:- more code to cache - slower code just to allow CTFE.
__ctfe is a constant, though. Any half-decent optimizer will throw away the path that's not taken. dmd does it even without the optimization flag -O.