faster splitter

qznc via Digitalmars-d digitalmars-d at puremagic.com
Fri May 27 10:33:23 PDT 2016


On Friday, 27 May 2016 at 14:41:29 UTC, Chris wrote:
> The improved `std find` comes very close to the manual function 
> above now, sometimes it's even faster or at least as fast.

I think it really depends on the use case. The manual algorithm 
is really naive and std-find is slightly more advanced. My 
benchmark creates a random haystack and needle, but this is not 
real world data. I believe the "slightly more advanced" approach 
is a good idea, but there is no data to prove it.

It might be interesting what algorithms other language's standard 
libraries (C++, Python, Java, etc) use.

Thanks for looking at the benchmarking, Chris! The more eyes, the 
better. :)


More information about the Digitalmars-d mailing list