How about a Hash template?
Denis Koroskin
2korden at gmail.com
Fri Apr 29 16:21:31 PDT 2011
On Sat, 30 Apr 2011 03:19:37 +0400, Alexander <aldem+dmars at nk7.net> wrote:
> On 29.04.2011 21:58, Andrei Alexandrescu wrote:
>
>> You need to replace the assert and compile with -O -release -inline. My
>> results:
>
> [snip]
>
> Still, straight comparison wins - 2x faster ;)
>
> /Alexander
That's just an optimizer issue. Even if you replace the code body with
"return false;" (i.e. not found) it's STILL slower than straight
comparison.
More information about the Digitalmars-d
mailing list