2 ms·
Clang has a profiler for why your C++ compiles slow. Last I saw templates were not responsible for much in a typical codebase. For Rust, though, the answer is
by kllrnohj 9y ago
Clang has a profiler for why your C++ compiles slow. Last I saw templates were not responsible for much in a typical codebase.
For Rust, though, the answer is obvious - the borrow checker. The language is designed around the idea of the compiler proving whether or not the code is safe and inserting appropriate destructors where they should be. I think it's expected that this will be slower than a language that just doesn't do that.
- steveklabnik 9y agoThe borrow checker is clearly not the issue, if you look at the numbers. It does take some time but is far from the most expensive section in every profile I’ve ever seen. The NLL version is slower than today’s, at the moment, though.
- dman 9y agoAny pointers to the profiler?
- kllrnohj 9y agohttps://github.com/mikael-s-persson/templight https://github.com/mikael-s-persson/templight