timotheecour / D_vs_nim

comparison of D vs nim
Apache License 2.0
63 stars 14 forks source link

compile time speed #23

Open timotheecour opened 6 years ago

timotheecour commented 6 years ago

(ported from https://github.com/timotheecour/D_vs_nim/issues/11#issue-308258917)

EDIT

marler8997 commented 6 years ago

Note that the example in the NIM article was only with 1 source file. Because Nim compiles to C, it suffers from the same scalability compile-time issues that C suffers from. The core issue being that every source file is compiled in its own universe, where everything that is referenced needs to be redefined for every source file. I believe Nim tries to mitigate this by only defining whatever is being used by the file, which helps, but can't compete with a solution where analyzed code is "reused" instead of "redefined" with every source file.