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.

Thanks!

- Julian

Reply via email to