3 ms·
I'm curious about how much easier it is to optimize compiler time for macros rather than templates here. In theory they wouldn't be all that different, but in
by ludamad 5y ago
I'm curious about how much easier it is to optimize compiler time for macros rather than templates here. In theory they wouldn't be all that different, but in practice it doesn't seem so
- glouwbug 5y agoCTL just copy pastes a bunch of code via an include for each new type. The following two tidbits are basically the same thing: CTL #define P #define T int #include <vec.h> STL #include <vector> template class std::vector<int>; C++ with its STL is just dramatically slower at compiling it all. C loves to chew through its basic syntax and O(1) lookup since every symbol is essentially unique (take that C++ and your function overloading!)