Skip to content

Commit

Permalink
perf: improve speed of TreeSet.addAll
Browse files Browse the repository at this point in the history
  • Loading branch information
rbellens committed Feb 26, 2024
1 parent cb98a5c commit 7c8b6e1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/src/treeset.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ abstract class TreeSet<V> extends SetMixin<V> implements Set<V> {

TreeSet._(this.comparator);

static int _defaultCompare<V>(V a, V b) => (a as Comparable).compareTo(b);
static int _defaultCompare(dynamic a, dynamic b) =>
(a as Comparable).compareTo(b);

BidirectionalIterator<V> fromIterator(V anchor,
{bool reversed = false, bool inclusive = true});
Expand Down

0 comments on commit 7c8b6e1

Please sign in to comment.