Potential of a compiler that creates the executable at once
bauss
jj_1337 at live.dk
Thu Feb 10 11:54:59 UTC 2022
On Thursday, 10 February 2022 at 09:41:12 UTC, rempas wrote:
>
> At some point about 3 months ago, the creator of the language
> said that at that point, Vox can compile 1.2M LoC/S which is
> really really fast and this is a point that 99% of the projects
> will not reach so your project will always compiler in less
> than a second no matter what! What is even more impressive is
> that Vox is single thread so when parsing the files for symbols
> and errors, why could get a much bigger performance boost if we
> had multithread support!
>
You see, there's a large misconception here.
Typically slow compile times aren't due to the LoC a project has,
but rather what happens during the compilation.
Ex. template instantiation, functions executed at ctfe,
preprocessing, optimization etc.
I've seen projects with only a couple thousand lines of code
compile slower than projects with hundreds of thousands of lines
of code.
Generally most compiles can read large source files and parse
their tokens etc. really fast, it's usually what happens
afterwards that are the bottleneck.
Say if you have a project that is compiling very slow, usually
you won't start out by cutting the amount of lines you have,
because that's often not as easy or even possible, but rather you
profile where the compiler is spending most of its time and then
you attempt to resolve it, ex. perhaps you're running nested
loops that are unnecessary etc. at compile-time and so on.
More information about the Digitalmars-d
mailing list