On 8/9/2015 12:36 AM, Iain Buclaw via Digitalmars-d wrote:
What about intrinsics?
https://github.com/D-Programming-Language/phobos/blob/94f718e5c69939f595fb839d3aae24878f126d78/std/math.d#L630
There isn't a simd cosine instruction, so making cos(double) builtin accomplishes nothing. However, the casting in those functions go away when code is generated.
For example:
import std.math;
double foo(double d) {
return cos(d);
}
generates:
_D3foo3fooFdZd:
fld qword ptr 4[ESP]
fcos
ret 8