I've used static struct initializers because somehow the dmd optimizer is able 
to produce more efficient code. If you replace the C-style static struct 
initializers in this program with D ones (the ones like Foo(1, 2)) the program 
gets slower:
http://shootout.alioth.debian.org/debian/benchmark.php?test=nbody&lang=gdc&id=1

Maybe dmd doesn't see D-style static struct initializers as true compile-time 
constants, I don't know. I think LDC doesn't share this problem/limit.

Bye,
bearophile

Reply via email to