On Monday, 15 February 2016 at 14:16:02 UTC, Guillaume Piolat
wrote:
On Monday, 15 February 2016 at 13:51:38 UTC, ixid wrote:
This is the most recent one where John Colvin provided some
pointers to speed it up significantly. Walter has done some
good work taking the low-hanging fruit to speed up DMD code
and there is a lot of effort going on with reference counting
machinery but I wondered if some of the common errors people
make that slow down D code can be addressed?
Something that annoyed me a bit is floating-point comparisons,
DMD does not seem to be able to handle them from SSE registers,
it will convert to FPU and do the comparison there IIRC.
Same for std.math.lround
they use the FP way while for float and double it's only one sse
instruction. Typically with 6 functions similar to this one:
int round(float value)
{
asm
{
naked;
cvtss2si EAX, XMM0;
ret;
}
}
we could get ceil/trunc/round/floor, also almost as easily fmod,
hypoth.
classic but I dont get why thery're not in std.math.
Goddamnit, we're in 2016.