Jai compiles 80,000 lines of code in under a second
aliak
something at something.com
Fri Sep 21 13:28:47 UTC 2018
On Friday, 21 September 2018 at 01:04:51 UTC, Joakim wrote:
> On Friday, 21 September 2018 at 00:47:27 UTC, Adam D. Ruppe
> wrote:
>> Of course, D can also take ages to compile one line of code.
>> It all depends on that that line is doing... ctfe and
>> templates are slow. C or Java style code compiling in D is
>> very fast.
>
> I was going to say this too, ie how much of that Jai code is
> run at compile-time, how much is uninstantiated templates that
> is just skipped over like D does, and how much is templates
> instantiated many times? Lines of code is not a good enough
> measure with those programming constructs.
>
> I was just building the stdlib tests with LDC yesterday and
> they took so much memory on a new Linux/x64 VPS with 2GB of RAM
> that I had spun up that I couldn't even ssh in anymore. I
> eventually had to restart the VPS and add a swapfile, which I
> usually have but simply hadn't bothered with yet for this new
> Ubuntu 18.04 VPS. The stdlib tests instantiate a ton of
> templates.
Sure, all true, but from what I've seen of Jai, it's not a simple
language, and it does a decent amount of compile time stuff, but
who knows, maybe the code is simple indeed. I remember a demo
where he ran a game at compile time and was also fast AFAIR. I
think that his goal is to keep it fast regardless of which
features are used though. I hope.
Regardless, you can't really claim X compiles fast if that's only
true on a subset of the language features. Cause otherwise the
statement "X compiles fast" is, well, just not true ;)
More information about the Digitalmars-d
mailing list