-
-
Notifications
You must be signed in to change notification settings - Fork 932
Open
Milestone
Description
From https://bugs.ruby-lang.org/issues/13136.
When sampling more than 3 items from a large array (ten in the original issue because of how the C code is designed) performance of Array#sample can degrade. This is primarily because the fallback logic dups the original array and uses it as a temporary store while sampling elements.
The logic in JRuby largely mimics the CRuby logic, so the patch provided to fix the above issue should help us in the same way. It is more complex than I wanted to tackle while fixing up remaining failures for JRuby 10, and does not resolve any of them.
See the fix in ruby/ruby@2de1dbd.
Metadata
Metadata
Assignees
Labels
No labels