floor operation problem
Marco Leise
Marco.Leise at gmx.de
Thu Dec 19 08:20:34 PST 2013
Am Thu, 19 Dec 2013 14:54:56 +0100
schrieb "bearophile" <bearophileHUGS at lycos.com>:
> David Nadlinger:
>
> > I don't think Marco is building his C executable with
> > -ffast-math.
>
> Showing the asm is a good way to understand what's going on in
> those 64 bit builds.
>
>
> > We should definitely be able to provide a switch to enable the
> > same unsafe/wrong FP optimizations in LDC as well.
>
> So is this floor problem caused by those (missing) FP
> optimizations? :-)
>
> Bye,
> bearophile
At first my gcc executable had the same speed as on your
computer, bearophile (~1s). Then I removed some of the flags
including -ffast-math from the gcc command-line and it became
25% faster -> 0.8s. I didn't try your original ldmd2
command-line, but one from a generic "omg-uber-optimize"
Makefile I often use for stuff like this and immediately had
the same performance in D as for C. I cannot show you the
disassembly though, I'm in the middle of upgrading to to Gnome
3 and most programs don't work, like e.g. copy&paste from
terminals.
--
Marco
More information about the digitalmars-d-ldc
mailing list