Alo!

I just watched this talk from Jonathan Blow [0] about his programming language called Jai, and he can now compile an 80,000 line game in about 1.5 seconds on a laptop (of course I have no idea what laptop he's using), under 1 second on a desktop.

And he claims it's he wants to eventually hit compilation of 1,000,000 lines per second and that he thinks that's a realistic goal.

I just tried compiling an optional utility library that has a grand total of 1794 lines in .d files and:

time dmd -c -debug -g -unittest -w -Isource/ -Itests -I../../.dub/packages/bolts-0.7.1/bolts/source/ source/optional/dispatch.d source/optional/internal.d source/optional/notnull.d source/optional/optional.d source/optional/package.d source/optional/traits.d tests/dispatch.d tests/match.d tests/notnull.d tests/optional.d tests/orelse.d tests/unwrap.d

1.92s user 0.23s system 99% cpu 2.157 total (2.6ghz, 4 cores, plenty ram)

Have compile times gotten worse in D over the years or better or just stayed the same? And is there anyway to get even near the performance of Jai when it comes to compilations (parallelize stuff here and there maybe)? Or is DMD in a state where that is just not feasible?

On a related note: He also mentions some really cool compilation features like having compiler hooks that tell you when compilation is done, when executable and where it will be written so you can create your build recipe inside the program itself. Also allows you do do things like:

whenCompilationFinishes(exeLocation) => loadExecutableIcon(myIcon, exeLocation)

During the build!

Your source knows how to build itself as a concept is awesome! There's actually a D runner [1] that kind of allows for source files to set stuff up.

[0] https://www.youtube.com/watch?v=uZgbKrDEzAs
[1] https://github.com/marler8997/rund

Reply via email to