How to deal with inline asm functions in Phobos/druntime?
Kai Nacke via digitalmars-d-ldc
digitalmars-d-ldc at puremagic.com
Wed Apr 8 04:55:29 PDT 2015
On Wednesday, 8 April 2015 at 11:29:26 UTC, David Nadlinger wrote:
> Speaking about performance: Haven't we switched to 64 bit reals
> on
> Win64 for the time being? If so, we'd probably want a version
> of ilogb
> that uses SSE instead of the x87 FPU. This is probably (I'm
> rather
> sure, but did not measure it) a much bigger performance problem
> than
> any overly long general purpose register pushing/popping
> prologues
> generated by non-naked asm functions.
Yes, reals are 64bit on Win64. Using SSE can really help here.
Speaking of performance: The only way to know the some piece of
code is faster is to measure it. This can reveal surprising
insights.... (Hint!)
> ilogb() does not seem to be a commonly used function, though,
> so it
> might not be worth the effort.
There are lot of other functions, too. E.g. the inline assembler
in expi() is commented because of a problem with the asm parser.
I think Johan will find enough worthwhile targets.
Regards,
Kai
More information about the digitalmars-d-ldc
mailing list