mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
![ko1](/assets/img/avatar_default.png)
* tool/gcbench.rb: separate GC bench framework and process. * tool/hashbench1.rb, tool/hashbench2.rb: add two types GC bench. hashbench1: many temporal objects (GC by newobj) hashbench2: hash size becomes bigger and bigger (GC by malloc) Two benchs are executed by `gcbench-hash' rule. * tool/rdocbench.rb: separated. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
7 lines
80 B
Ruby
7 lines
80 B
Ruby
value = 0.01
|
|
h = {}
|
|
n = 4*(10**6)
|
|
|
|
1.upto(n){|i|
|
|
h["%020d" % i] = value * i
|
|
}
|