Closed RomanKornev closed 3 years ago
Is there a reason why elementAt needs to go through every item one by one? I suggest instead to check for bounds and access by index directly. https://github.com/leisim/dartx/blob/master/lib/src/iterable.dart#L43
Thanks for reporting. While it is not possible for Iterable, there is the opportunity to add a faster version for List
Iterable
List
Thanks! I think elementAtOrElse might have the same problem.
elementAtOrElse
Is there a reason why elementAt needs to go through every item one by one? I suggest instead to check for bounds and access by index directly. https://github.com/leisim/dartx/blob/master/lib/src/iterable.dart#L43