N-body bench

bearophile bearophileHUGS at lycos.com
Thu Jan 30 10:43:01 PST 2014


Stanislav Blinov:

> Looks like both dmd and ldc don't optimize slice operations 
> yet, had to revert to loops

It's a very silly problem for a statically typed language. The D 
type system knows the static length of those arrays, but it 
doesn't use such information.
(Similarly several algorithms in Phobos force to throw away this 
very precious compile-time information requiring dynamic arrays 
in input.)

I have just suggested a fix for ldc2:
http://forum.dlang.org/thread/qeytzeqnygxpocywyifp@forum.dlang.org

I have a similar enhancement request since some time in Bugzilla:
https://d.puremagic.com/issues/show_bug.cgi?id=10523
https://d.puremagic.com/issues/show_bug.cgi?id=10305

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list