The worst Phobos template (in binderoo)

Stefan Koch via Digitalmars-d digitalmars-d at puremagic.com
Wed Sep 14 14:50:09 PDT 2016


On Wednesday, 14 September 2016 at 21:06:10 UTC, Andrei 
Alexandrescu wrote:
> On 09/14/2016 04:52 PM, Stefan Koch wrote:
>> [...]
>
> (Disclaimer: I didn't run any speed tests.) By looking at the 
> definition of fullyQualifiedName it seems to me we can go a 
> long way with traditional optimization techniques. For example 
> consider:
>
> [...]

staticMap is number 3 in the top-slow-templates list.
And the code inside it really does not matter so much.
What matters is recursive instanciation.

the evaluation of the function is fast in comparison to the time 
the template-subsystem takes.

I believe this cannot be fixed by changing a library solution.




More information about the Digitalmars-d mailing list