Reduce performance penalty in Remove
caused by method dispatch overhead for lists?
#767
Labels
kind: enhancement
Label for issues suggesting enhancements; and for pull requests implementing enhancements
topic: performance
bugs or enhancements related to performance (improvements or regressions)
When fixing a bug in a kernel method for
Remove
I noticed the following:This shows that
Unbind
I don't see a quick and compatible way to improve the second loop. If we proceeded as in other cases (the last I remember was
Reversed
) we could changeRemove
to a function which catches the main cases of internal lists efficiently and calls a newly introduced operationRemoveOp
for other cases. The disadvantage of this approach is that current method installations forRemove
must be adjusted.But maybe this is not worth the effort and the time could be spent better on addressing the problem in general?
Further remarks:
met
in the fourth loop of the example is never called and could be removedRemove
with one argument shrinks the memory allocated for a list when its length becomes less than 3/4 of the available entries. Maybe this should be done byUnbPlist
in general?The text was updated successfully, but these errors were encountered: