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

Re: svn_rangelist_dup -> ptr_array_dup?

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Mon, 24 Feb 2014 09:19:09 +0000 (GMT)

Stefan Fuhrmann wrote:
> Julian Foad wrote:
>> In svn.apache.org/r1395434 and svn.apache.org/r1483310, you optimised
>> svn_rangelist_dup().
>> An svn_rangelist_t is an APR array of pointers to small simple objects.
>> I guessed we would have other places where we want to duplicate an
>> array of pointers to simple objects, but I guessed wrong and
>> can't find any. Nevertheless, how about we factor out the generic
>> array-duplication code like this, in order to maintain a clear
>> separation between rangelist code and generic array code? I think
>> that makes it easier for a reader to see that there's nothing special
>> happening there that concerns rangelists specifically.

> Yes, that makes sense.
>> I have at the back of my mind that this function could very well be
>> proposed for inclusion in APR, but I am not presently thinking of doing so.
> It is still a rather specific application (copy depth == 1).
> APR would probably want something with copy callbacks,
> which would defeat the purpose of the whole exercise.
>> Of course, parameterizing the 'object size' like this may make it
>> slightly slower. I don't imagine it would be significant but haven't
>> measured it. Does that bother you in this case?
> I looked at the generated code and it is basically identical
> to what we get without the patch - thanks to the constant
> propagation in higher optimization levels.

> Committed as r1570904.


- Julian
Received on 2014-02-24 10:29:37 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.