You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add advice to reword .unique :with using :as when possible
The :with has O(n²/2) complexity and basically slows to a crawl with
2000+ element lists.
my @p = 1..3000; @ = @p.unique: :with(&[eqv]); say now - INIT now; # 25.42728348
my @p = 1..3000; @ = @p.unique: :as(*.Str); say now - INIT now; # 0.0185597
say 25.427/.0186; # 1367.043011
0 commit comments