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.
Thanks,
//Peter
---------------------------------------------------------------------
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