std.math API rework

Johan Engelen via Digitalmars-d digitalmars-d at puremagic.com
Fri Oct 7 11:23:10 PDT 2016


On Friday, 7 October 2016 at 17:02:02 UTC, Andrei Alexandrescu 
wrote:
> On 10/07/2016 03:42 AM, Ilya Yaroshenko wrote:
>> 
>> 2. Math funcitons are not templates -> They are not inlined -> 
>> No vectorization + function calls in a loop body. One day this 
>> may be fixed, but (1.a, 1.b).

That trivial non-template functions are not cross-module inlined 
by LDC is something I am working on (use 
`-enable-cross-module-inlining` with 1.1.0). I wouldn't use it as 
an argument for significant changes.

> How to the likes of Eigen do it? Do they provide their own 
> templated implementation of <math.h>?
>
> Have you investigated the much hailed link-time inlining?

Also a work-in-progress. It would at the very least require a 
special build of Phobos, something we don't do yet.



More information about the Digitalmars-d mailing list