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
Added in #3387, the method relies on a loop followed by two Seq.apply calls:
while (i < groups.length) {
if (groups(i) != groups(i -1)) {
...
which for lazily generated sequences (when I checked, groups was an instance of scala.collection.immutable.Stream$Cons) is quadratic. This behavior can be seen by comparing the running times of the following accesses:
Added in #3387, the method relies on a loop followed by two
Seq.apply
calls:which for lazily generated sequences (when I checked,
groups
was an instance ofscala.collection.immutable.Stream$Cons
) is quadratic. This behavior can be seen by comparing the running times of the following accesses:(I ctrl-C'd before that last one finished on my machine)
The method
buildGroups
should do a single pass and not rely on index access.The text was updated successfully, but these errors were encountered: