Array!T and find are slow
David Nadlinger via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed May 14 07:54:56 PDT 2014
On Wednesday, 14 May 2014 at 14:24:28 UTC, Damian Day wrote:
> I've written some search functions, which are many times
> faster, is it
> worth making a pull request?
Generally, we strive to make the algorithms in Phobos as fast as
possible even in the general case. I didn't look at the issue at
hand in any detail, but if the "-O -release -inline" performance
when operating on Arrays is considerably worse than when directly
operating on the data, we have a problem, as it likely to also
impact other ranges.
In short, I don't think the best solution is to add this special
case to Array!T, but rather to figure out what exactly is wrong
with Array!T and/or find() and fix the problem at its source.
Could you post a short benchmark snippet explicitly showing the
problem?
Best,
David
More information about the Digitalmars-d-learn
mailing list