[phobos] [D-Programming-Language/phobos] 8b2ff4: Revert "Merge pull request #24 from braddr/intrins...
Don Clugston
dclugston at googlemail.com
Wed May 4 16:29:48 PDT 2011
On 4 May 2011 20:11, Brad Roberts <braddr at puremagic.com> wrote:
> I still disagree with your logic. The entire point of the runtime is to provide and encapsulate the boundary between
> the compiler and higher level libraries. Intrinsics are inherently part of that boundary.
I don't agree with that -- I really don't like the vague word "boundary".
My view: the runtime contains support code, which is required by the
compiler. So that, if you remove something from the runtime, something
won't work.
This is not true for these intrinsics -- the fact that they are
intrinsics is a compiler-specific optimisation, and nothing more. I do
not believe that functions should be moved out of Phobos just because
some compiler has provides an intrinsic for them.
One thing for sure --- on ANYTHING other than x86 using an x87 CPU,
sin() and cos() will not be intrinsics.
The only reason the bit operation intrinsics are in the runtime is
because the runtime uses them, and we want to have that optimisation
available.
Likewise, the only possible benefit I could see for this, is if the
runtime was to use those functions itself. But it is just as likely to
require non-intrinsic math functions (you can make a reasonable case
that exp() should be in the runtime).
More information about the phobos
mailing list