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

Re: [PATCH][merge-tracking]Better way to iterate the locally scoped hashes

From: Peter Lundblad <plundblad_at_google.com>
Date: 2007-01-22 11:08:56 CET

Kamesh Jayachandran writes:
> Hi All,
> Find the attached patch and log.
> With regards
> Kamesh Jayachandran
> [[[
> Better way to iterate locally scoped hashes.
> * subversion/libsvn_client/diff.c
> (display_mergeinfo_diff, update_wc_merge_info, do_child_merges):
> Use hash's iterator rather than allocating from the pool for
> locally scoped hashes.

I am not sure I find this way "better". Sure, it does avoid a slight
allocation out of a pool. OTOH, when one reads this cod,e one has to
think "hey, where does this hash table come from, is it considered
read-only, and am I sure no caller up the call chain doesn't pass it
to multiple threads at a time?" Is this microoptimization really worth
the readability hassle? I think we use an explicit pool almost everywhere we
iterate over a hash table.


To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Jan 22 11:09:23 2007

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