[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r34537 - trunk/subversion/libsvn_fs_fs

From: Hyrum K. Wright <hyrum_wright_at_mail.utexas.edu>
Date: Wed, 03 Dec 2008 15:14:28 -0600

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

This is an archived mail posted to the Subversion Dev mailing list.