|
|
|
|
|
by Joker_vD
706 days ago
|
|
> A JSON decoder right in the compiler could easily be faster than generation involving extra tool invocations and multiple passes. It also can easily be slower: C++ templates are not exactly known for their blazingly fast compilation speed. Besides, the program they encode in this case is effectively being interpreted by the C++ compiler which, I suppose, is not really optimized for that: it's still mostly oriented around emitting optimized machine code. |
|
Compared to what alternative that does the same thing, in C++?
Modern C++ compilers, as such, are slow as molasses, on multi-GHz hardware with huge L1 and L2 caches, whether your code uses templates or not.