diff options
| author | nekoyama32767 <60657593+nekoyama32767@users.noreply.github.com> | 2023-05-20 19:40:27 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-20 19:40:27 +0900 |
| commit | 87217f26f120611d009f1b178d3cc5eaf1b8b515 (patch) | |
| tree | 076728143f2a038c0e953a85c9c14a3a11a6d7d6 /test/ruby/test_lambda.rb | |
| parent | 892798cac8d025ad30a99fc2a0efa6b0a7a8dd0e (diff) | |
[Feature #19643] Direct primitive compare sort for `Array#sort_by`
In most of case `sort_by` works on primitive type.
Using `qsort_r` with function pointer is much slower than compare data directly.
I implement an intro sort which compare primitive data directly for `sort_by`.
We can even afford an O(n) type check before primitive data sort.
It still go faster.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/7805
Merged-By: nobu <nobu@ruby-lang.org>
Diffstat (limited to 'test/ruby/test_lambda.rb')
0 files changed, 0 insertions, 0 deletions
