← Back to context

Comment by ksec

20 hours ago

Are there any other languages that offer similar compilation performance. The only one I know of or remember is Turbo Pascal.

Everyone forgets D. It’s probably the fastest to compile, even faster than Go

Delphi, D, Nim, Go, C# / .NET Native / Native AOT, Oberon (any on the language family), Ada (depends on the compiler, 7 vendors),...

  • FWIW, IME at least Nim isn't particularly fast when building, at least when compared to C projects. E.g. in the sokol-nim bindings I'm seeing build timings like:

        32743 lines; 0.953s
    

    ...building 32k lines of code in a second really isn't fast on an M1 Mac, and that's for a debug build without optimization.

Compilation speed isn’t that much of a factor of language as far as I can understand. It is more related to how optimization is done and how machine code is generated.

Also obviously it is about how fast the actual implementation of the compiler/build-system is.

  • Definitely not true. Otherwise we would have really fast C++ compilers and no one would ever have implemented hacks like precompiled headers.

    • That hack is because of C.

      Definitely true when using VC++ with C++20 modules and MSBuild.

      It also helps not compiling everything from source as many UNIX folks do.

      2 replies →

  • This has drastically changed with "recent developments".

    Iteration speed is everything now, if and only if you learn from the additional iterations.