Am 20.06.2014 22:44, schrieb bearophile:
dennis luehring:
it does not makes sense to "optmized" this example more and
more - it should be fast with the original version
But the original code is not fast. So someone has to find what's
broken. I have shown part of the broken parts to fix (floor on
ldc2).
Also, the original code is not written in a fully idiomatic way,
also because unfortunately today the "lazy" way to write D code
is not always the best/right way (example: you have to add ton of
immutable/const, and annotations, because immutability is not the
default), so a code fix is good.
Bye,
bearophile
as long as you find out its a library thing
the c version is without any annotations and immutable/const the fastest
- so whats the problem with D here, it can't(shouln't) be that one needs
to work/change that much on such simple code to reach c speed