Julian Foad wrote:
> Hyrum K. Wright wrote:
>> Yeah, I felt the same way here, but I was hesitant to put a conditional in the
>> middle of the inner loop like that, especially since it would only be true one
>> time in 1000.
>
> I'm wondering if you hesitated entirely for reasons of execution speed,
> or for aesthetics of the code structure. If you're talking about the
> "for (tmp_rev...)" loop which contains 4 non-trivial lines of high-level
> code, speed won't be an issue because a simple conditional like "if
> (tmp_rev == rev) { ... }" would add only about 2 or 3 machine
> instructions of overhead to the hundreds or thousands that are already
> there.
Yeah, primarily for execution speed, but I was thinking more along the lines of
pipeline stalls than adding extra machine code. However, I think your point is
valid: given the amount of magic going on inside svn_cache__set(), it's probably
safe to ignore this micro optimization.
r34550.
-Hyrum
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=979132
Received on 2008-12-03 22:14:48 CET