Naive node.js faster than naive LDC2?

jmh530 john.michael.hall at gmail.com
Sat Aug 22 20:15:26 UTC 2020


On Saturday, 22 August 2020 at 16:38:42 UTC, Andrei Alexandrescu 
wrote:
> [snip]
>
> First off this is a great accomplishment of the V8 team. That's 
> the remarkable part.
>
> Second, this is in many ways not new. JIT optimizers are great 
> at optimizing numeric code and loops. With regularity ever 
> since shortly after Java was invented, "Java is faster than C" 
> claims have been backed by benchmarks involving numeric code 
> and loops. For such, the JIT can do as good a job as, and 
> sometimes even better than, a traditional compiler.
>
> The way of a low-level language competes is by offering you 
> ways to tune code to rival/surpass JIT performance if you need 
> to. (Of course, that means the programmer is spending time on 
> that, which is a minus.) I have no doubt the D mandelbrot code 
> can be made at least as fast as the node.js code.
>
> The reality of large applications involves things like 
> structures and indirections and such, for which data layout is 
> important. I think JITs have a way to go in that area.

It would be interesting to see a write-up where LDC's dynamic 
compile can speed up D code in the same way.


More information about the Digitalmars-d mailing list