Avoid a needless locking in sp_search()
authorMarco Costalba <mcostalba@gmail.com>
Mon, 19 Oct 2009 06:44:06 +0000 (07:44 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Mon, 19 Oct 2009 06:47:18 +0000 (07:47 +0100)
commit51c3af9dd01951cf23f17c5f7c6cb9f7c32dccdc
tree0768db0c7504920025eee3f86d93b4e6a43bf20e
parentf0b0a3b1358e5ae4b20ec973634288cfc802828b
Avoid a needless locking in sp_search()

Only in less then 2% of cases we have a new sp->bestValue,
so check before to lock and save a costly locking
most of the times.

Patch suggested by Joona.

No functional search.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/search.cpp