This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Possible improvement in next_permutation implementation


David GONZALEZ MALINE wrote:
> Hello Paolo,
>
> I have tried a few different tests. I changed the implementation of
> the algorithm in the STL using the one we have here and the time was
> basically the same one as the current algorithm. It looks like you are
> right when you think it's due to the use of bidirectional iterators,
> while in ROOT we use direct access to the arrays. 
Thanks for performing some tests on your side. At this point, we should
finally asses whether providing an overload optimized for random access
iterators is worth the trouble: I understand  the various *_permutation
functions are performance-critical in some of your code? Can you try to
provide some additional details about that? In general, quite a few
functions in <algorithm> lack some overloads optimized for special
classes of iterators and we have to figure on a case by case basis
whether the performance benefit is  worth the code maintenance, code
size, etc, counterparts...

Paolo.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]