Details
-
Improvement
-
Status: Open
-
Normal
-
Resolution: Unresolved
-
None
-
None
-
Performance
-
Normal
-
All
-
None
Description
CASSANDRA-15394 replaced the iterator based iteration with the get-by-index one to avoid allocation iterators.
It works for the lists that support RandomAccess, i.e. the big O of get() is O(1).
However, it fails when the list does not support RandomAccess. The get() method's time complexity can be linear, and it leads to O(n^2) for the overall iteration.
The implementation should provide different behaviors based on the property.