[KPhotoAlbum] Inefficiency in ImageSearchInfo::match()
Robert Krawitz
rlk at alum.mit.edu
Tue Sep 11 14:18:43 BST 2012
On Tue, 11 Sep 2012 09:04:54 -0400, Robert Krawitz wrote:
> On Tue, 11 Sep 2012 08:48:41 -0400, Robert Krawitz wrote:
>> On Tue, 11 Sep 2012 14:26:21 +0200, Jesper K. Pedersen wrote:
>>> Ahh x &= y is equal to x = x & y NOT x = x && y;
>>>
>>> That can be fixed with rewriting the code to
>>>
>>> b = b && trueFunction()
>>>
>>> and in the KPA code doing similar. Robert feel free to fix.
>>
>> I'd still rather have it explicitly short-circuit, but at least this
>> would be better.
>
> I measured very little speedup in startup (maybe 1%). Filtering
> operations are already quite fast on my database of 77000 images. Not
> worth the risk, in my view.
To be precise, I fixed the x &= y -> x = x && y, but not the explicit
return.
--
Robert Krawitz <rlk at alum.mit.edu>
MIT VI-3 1987 - Congratulations MIT Engineers men's hoops Final Four!
Tall Clubs International -- http://www.tall.org/ or 1-888-IM-TALL-2
Member of the League for Programming Freedom -- http://ProgFree.org
Project lead for Gutenprint -- http://gimp-print.sourceforge.net
"Linux doesn't dictate how I work, I dictate how Linux works."
--Eric Crampton
More information about the Kphotoalbum
mailing list