Jai compiles 80,000 lines of code in under a second

welkam wwwelkam at gmail.com
Fri Sep 21 16:29:59 UTC 2018


On Thursday, 20 September 2018 at 23:13:38 UTC, aliak wrote:
> 
> And is there anyway to get even near the performance of Jai 
> when it comes to compilations

I watched the same video today. What a coincidence.

In Jai example 80 000 lines of "code" include comments and empty 
lines. Since we know that that Jai example was written in 
parallel to language we can safely assume that most of that code 
is simple therefore its not surprising that Jai compiled that 
fast. Write C style code and DMD will perform similarly.

Can we improve D compiler speed? Ofcourse but core developers are 
more focused on stability and very needed functionality than 
speed. Thats good because I rather have c++ interop than 10% 
faster compilation speed.

Jai compiler perform parsing and lexing in different thread so 
its kinda multi threaded. Its possible to do the same with D 
front end. We can start here but there are plenty of low hanging 
fruits in compiler you just need to run profiler to find them


More information about the Digitalmars-d mailing list