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

Re: Further diff optimization ideas

From: Branko Čibej <brane_at_e-reka.si>
Date: Tue, 15 Feb 2011 16:54:15 +0100

On 15.02.2011 13:04, Johan Corveleyn wrote:
>> In other news, why do we need our own hash function anyway? Or our own
>> table or tree or whatever? NIH syndrome?
> No idea, really. I'm probably not the guy you're expecting an answer
> from :-), but:
> - apr_hashfunc_default could be very useful here, I think.
> - Concerning the tree (see token.c#tree_insert_token), maybe the
> reason is that some special things are done while inserting nodes into
> the tree? (like first comparing with the hash, and if that matches,
> compare the lines themselves; and letting all matching nodes point to
> the same "token" (line), when they're being inserted).

That's what apr_hash_t does ... more or less. Your token can just be the
address of the string in the hash.

-- Brane
Received on 2011-02-15 16:54:59 CET

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.