On 4/29/11 6:21 PM, Denis Koroskin wrote:
On Sat, 30 Apr 2011 03:19:37 +0400, Alexander <aldem+dm...@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.

Yah. I think the difference is immaterial outside inner loops. If it were like 20x slower that would've been a problem.

Andrei

Reply via email to