aboutsummaryrefslogtreecommitdiffstats
path: root/benchmark
diff options
context:
space:
mode:
authormrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-04-13 09:25:38 +0000
committermrkn <mrkn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-04-13 09:25:38 +0000
commit07efd196beb7c51ce04fda354b890767667b8820 (patch)
tree098346926986c3a5c4d298f6c0012e5246ceabb1 /benchmark
parent9c2e7ad61442f09b8bd85ab48265c166b9bd93a7 (diff)
downloadruby-07efd196beb7c51ce04fda354b890767667b8820.tar.gz
array.c: improve performance of Array#sort with block
* array.c (sort_1): improve performance of Array#sort with block * benchmark/bm_array_sort_block.rb: added for Array#sort with block [Bug #13344] [ruby-dev:50027] [Fix GH-1544] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58339 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'benchmark')
-rw-r--r--benchmark/bm_array_sort_block.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/benchmark/bm_array_sort_block.rb b/benchmark/bm_array_sort_block.rb
new file mode 100644
index 0000000000..3579786056
--- /dev/null
+++ b/benchmark/bm_array_sort_block.rb
@@ -0,0 +1,2 @@
+ary = Array.new(1000) { rand(1000) }
+10000.times { ary.sort { |a, b| a <=> b } }