Hacker News new | ask | show | jobs
by misja111 1258 days ago
Yes my project does contain a bit of typelevel stuff (Cats Effect). And it's Scala 2.13, so not the latest 3.x which might compile a bit faster. Also to be fair, I was referring to the time taken by sbt compile, which I suppose does more than just invoking scalac. But still the time reported by sbt's Compile/ Compile incremental is over 200s.
2 comments

to be fair, C+ header only libraries full of advanced template metaprogramming will also slow down compilation by a few order of magnitude.
I'm hopeful modules will come fast, they seem to fix that issue. Modules are already in C++20, but most compilers don't support them well enough yet.
I suspect they will help with the parsing, but not with template instantiation cost which dominates metaprogramming.
That is what external templates are for, pre-instantiate all common cases in a binary library.
I think 2.13 and 3.x are about par on compilation speed. sbt does add overhead, reportedly it can slow down compilation speed by half.
Martin?