2 ms·
This is hilarious. Yes, it turns out making constexpr into a general-purpose C++ emulator in the compiler is really fricking slow. Maybe native code-generation
by stefan_ 7y ago
This is hilarious. Yes, it turns out making constexpr into a general-purpose C++ emulator in the compiler is really fricking slow.
Maybe native code-generation isn't so bad, after all. Maybe we can just redefine "constexpr" to nothing, then compilers can just dump it all in a file, compile it, run it and there we go, the blazing fast integrated code generation pipeline we all seem to want and need.
- saagarjha 7y ago> Maybe we can just redefine "constexpr" to nothing, then compilers can just dump it all in a file, compile it, run it and there we go, the blazing fast integrated code generation pipeline we all seem to want and need. The semantics of constexpr do not allow for undefined behavior, so this would unfortunately not be feasible.
- acqq 7y ago> is really fricking slow But the problem is, as far as I can see, that the whole "Interpreter" project is started based on the assumptions, not on the realistic measurement of real life timings for real life inputs. At least in the text no proof is presented that the work is really justifiable.