rubybench 0.0.1a
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +14 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +5 -0
- data/Rakefile +2 -0
- data/benchmarks/core/array/reject_bench.rb +60 -0
- data/helpers/array.rb +293 -0
- data/lib/rubybench.rb +5 -0
- data/lib/rubybench/version.rb +3 -0
- data/rubybench.gemspec +23 -0
- metadata +82 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: a36010874ae9a5e14790dcd3bc9efbd53e1c2720
|
4
|
+
data.tar.gz: 156bffc77233c83d7f165e4fc565e259bcbec04d
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 32061bea05bef3fd0d87a96aeda1e6c2ef21e3331904320ed9b004efeb214a768acde35958e3faa6a7a32aca891020065bff46ced7be612fbb8021e5a8f0aee6
|
7
|
+
data.tar.gz: 2cbd70d1615ac292dafbfd30031dd00859b12c45226785640b93c838889a8df6cc7873add48b5d5698efe04fba71d0ce4c9061a058c9d869a1c452614186e61c
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 y8
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
data/Rakefile
ADDED
@@ -0,0 +1,60 @@
|
|
1
|
+
require "helpers/core/array"
|
2
|
+
|
3
|
+
benchmark Array do
|
4
|
+
benchmark "#reject" do
|
5
|
+
measure "all" do
|
6
|
+
def all(times, large_array = $large_array.dup)
|
7
|
+
i = 0
|
8
|
+
while i < times
|
9
|
+
large_array.reject { |v| true }
|
10
|
+
i += 1
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
measure "none" do
|
16
|
+
def none(times, large_array = $large_array.dup)
|
17
|
+
i = 0
|
18
|
+
while i < times
|
19
|
+
large_array.reject { |v| false }
|
20
|
+
i += 1
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
measure "all (external while)" do
|
26
|
+
def all(large_array = $large_array.dup)
|
27
|
+
large_array.reject { |v| true }
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
measure "none (external while)" do
|
32
|
+
def none(large_array = $large_array.dup)
|
33
|
+
large_array.reject { |v| false }
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
benchmark "#reject!" do
|
39
|
+
measure "all" do
|
40
|
+
def all(times)
|
41
|
+
i = 0
|
42
|
+
while i < times
|
43
|
+
large_array = $large_array.dup
|
44
|
+
large_array.reject! { |v| true }
|
45
|
+
i += 1
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
measure "none" do
|
51
|
+
def none(times, large_array = $large_array.dup)
|
52
|
+
i = 0
|
53
|
+
while i < times
|
54
|
+
large_array.reject! { |v| false }
|
55
|
+
i += 1
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
data/helpers/array.rb
ADDED
@@ -0,0 +1,293 @@
|
|
1
|
+
$small_array = [
|
2
|
+
[[[117953105]]],
|
3
|
+
[:bRV, :OD2eTYQBQY],
|
4
|
+
:"4rWCHMbY",
|
5
|
+
[[327776907, :pXJXJ8]],
|
6
|
+
784670386,
|
7
|
+
[[57548812, [:LVhmVvg0, 113018416]]],
|
8
|
+
:T,
|
9
|
+
299999475,
|
10
|
+
[[290463539, 604740052]],
|
11
|
+
:"5mIYTzDPBNV",
|
12
|
+
108807115,
|
13
|
+
160688221,
|
14
|
+
400750804,
|
15
|
+
277035297,
|
16
|
+
:lSnApoUIMS,
|
17
|
+
328808562,
|
18
|
+
[:isof7aNStwzp, 551905300],
|
19
|
+
591827388,
|
20
|
+
164604988,
|
21
|
+
695513112,
|
22
|
+
]
|
23
|
+
|
24
|
+
|
25
|
+
$large_array = [
|
26
|
+
:DCne,
|
27
|
+
:apScTg7EbT,
|
28
|
+
640650437,
|
29
|
+
:roPpncD,
|
30
|
+
:M,
|
31
|
+
:Shy8tTJvIK,
|
32
|
+
:NvL,
|
33
|
+
[884390611, [[811803718]]],
|
34
|
+
[:LGW, :"2DToMCMxx"],
|
35
|
+
719751067,
|
36
|
+
[:pIVIU3yJyV, [:mER5fdj]],
|
37
|
+
766179378,
|
38
|
+
:"8I",
|
39
|
+
368909659,
|
40
|
+
301511183,
|
41
|
+
878211544,
|
42
|
+
308683354,
|
43
|
+
462827137,
|
44
|
+
981965402,
|
45
|
+
[[525760611, [440398323]], [262473977, :"4s4zCTyq"]],
|
46
|
+
209805240,
|
47
|
+
565508721,
|
48
|
+
355311411,
|
49
|
+
[[487599522], [23816217, :Ad]],
|
50
|
+
[885664140, 738202711],
|
51
|
+
:pEs,
|
52
|
+
507949515,
|
53
|
+
424218410,
|
54
|
+
:VvFSNf,
|
55
|
+
108053500,
|
56
|
+
[[:uxigf, [[910647325, 396262021], 252069733]], :BGIl],
|
57
|
+
[[:Kr1fz0el], [94594073, :Kc2]],
|
58
|
+
[[501572927], :RBuZ],
|
59
|
+
[[980018256, :g], :iY03R],
|
60
|
+
355922486,
|
61
|
+
[[:"3KqNVj"]],
|
62
|
+
:EeR2XP,
|
63
|
+
[[[473462304, 54796102], 801503872]],
|
64
|
+
:tbFhh1EawuQ,
|
65
|
+
:VlweBX,
|
66
|
+
:e5q8hFF85,
|
67
|
+
[209840388, 381195542],
|
68
|
+
77947233,
|
69
|
+
:"8ZMuAcL",
|
70
|
+
:ZG,
|
71
|
+
[:z],
|
72
|
+
312142962,
|
73
|
+
[:i5Bwr2MM, [[[:eH]]]],
|
74
|
+
:d3o18o4RPDo2,
|
75
|
+
178571067,
|
76
|
+
98937471,
|
77
|
+
570139119,
|
78
|
+
198078444,
|
79
|
+
954066365,
|
80
|
+
[:"3eAsdQiXfa", [:H7M4GJcInA]],
|
81
|
+
[:WPJiRVy8GgWj],
|
82
|
+
[[:kVpRcp, [925195711, 735262942]]],
|
83
|
+
139916477,
|
84
|
+
[[[449500215, [[[538177591, :zwBo2GeB]]]]]],
|
85
|
+
150147479,
|
86
|
+
[:i],
|
87
|
+
:nl3p,
|
88
|
+
:h,
|
89
|
+
[[690972725]],
|
90
|
+
63171115,
|
91
|
+
618439953,
|
92
|
+
[:hUsiP, 941514031],
|
93
|
+
[:O, [:"0gKNDi7", :"3mHer2Y"]],
|
94
|
+
492512323,
|
95
|
+
251805990,
|
96
|
+
:GO2Q,
|
97
|
+
805563105,
|
98
|
+
21740345,
|
99
|
+
[[:HVeJ, [[[:EHhUCUbb2H, [[225210099], :VdVgm1]]]]], [933914789, 662774857]],
|
100
|
+
:OJBV1,
|
101
|
+
510765990,
|
102
|
+
:BNnIwrl,
|
103
|
+
:kjIl7,
|
104
|
+
:s70z,
|
105
|
+
[:TdcdVS],
|
106
|
+
966030764,
|
107
|
+
:MQWJmfCSRj,
|
108
|
+
[438192977, 502008215],
|
109
|
+
:"5xi3Y",
|
110
|
+
636435632,
|
111
|
+
207025153,
|
112
|
+
:PFzxjdA8o7,
|
113
|
+
:TqPWSWgsdnhY,
|
114
|
+
899256241,
|
115
|
+
25966241,
|
116
|
+
:VIIe4xcfCMp,
|
117
|
+
[[966745699], 363426800],
|
118
|
+
896569084,
|
119
|
+
544335267,
|
120
|
+
23708017,
|
121
|
+
579447032,
|
122
|
+
[[[73248903], [833143227, 638412150]], [:UZE2]],
|
123
|
+
863196727,
|
124
|
+
:"1",
|
125
|
+
876403705,
|
126
|
+
:S33YA0FD674,
|
127
|
+
:ei,
|
128
|
+
[[:g7Ajitpwu1, 699266918], :ZtASraQs0C],
|
129
|
+
725589209,
|
130
|
+
[:CcPFjRW, [[800775167, [[349587951], [[:MrXhz]]]], :Dv]],
|
131
|
+
:"1T",
|
132
|
+
[[135940766]],
|
133
|
+
162299597,
|
134
|
+
804590524,
|
135
|
+
995712703,
|
136
|
+
[:R5f0aP3WUabo, [[401304198], :GpWYVRfT]],
|
137
|
+
:Bd3GbVC4,
|
138
|
+
963974873,
|
139
|
+
[[:"4ko", [298754976]]],
|
140
|
+
:Q8g1K,
|
141
|
+
:hh,
|
142
|
+
[[[[:KUfwKlTc, [:n1]]]], [[[[264794941]], :dPQ]]],
|
143
|
+
376769153,
|
144
|
+
[415067096, :M6tL21ybm3],
|
145
|
+
376526623,
|
146
|
+
940099721,
|
147
|
+
[821478278, :ibgqT11bB7q0],
|
148
|
+
366773709,
|
149
|
+
:IDP,
|
150
|
+
29446697,
|
151
|
+
[444247007, 641181723],
|
152
|
+
:hEqN,
|
153
|
+
[:kp, :MkKIi],
|
154
|
+
[[[:eVkMZmU83ccl], :OPH8fMzDCN], :RvZj3tH4Q],
|
155
|
+
471757853,
|
156
|
+
:fmo,
|
157
|
+
:GnYkzzL,
|
158
|
+
:Yby,
|
159
|
+
:fsb2,
|
160
|
+
[900813922, :u],
|
161
|
+
:P,
|
162
|
+
:DTxZwjWfEoNf,
|
163
|
+
218143925,
|
164
|
+
[562927537],
|
165
|
+
536303244,
|
166
|
+
438309558,
|
167
|
+
:XFdfJLXwU,
|
168
|
+
[[[:zbagiCSYpl], 665516321], [798237776, :LkVqk7JH]],
|
169
|
+
:RhnG,
|
170
|
+
529359312,
|
171
|
+
185868915,
|
172
|
+
260824547,
|
173
|
+
744694017,
|
174
|
+
725445205,
|
175
|
+
[[680032845, :n], :OUj1EILL5GL],
|
176
|
+
:gm7AdIAQicd,
|
177
|
+
665330641,
|
178
|
+
:YA0x,
|
179
|
+
:EYK1,
|
180
|
+
:gfnfPy,
|
181
|
+
354183973,
|
182
|
+
729295195,
|
183
|
+
771920833,
|
184
|
+
[:fxFj],
|
185
|
+
37766541,
|
186
|
+
804699185,
|
187
|
+
:YRrFitD,
|
188
|
+
:W,
|
189
|
+
[[:V6u6nzWQZ]],
|
190
|
+
104311942,
|
191
|
+
[500139637],
|
192
|
+
:bpVnAffQb,
|
193
|
+
[:MR0rSDTvVl, 343968413],
|
194
|
+
267489586,
|
195
|
+
:x5eLKOzpCws,
|
196
|
+
990331322,
|
197
|
+
:M,
|
198
|
+
:AU6nFC8V,
|
199
|
+
273592958,
|
200
|
+
:hEj5dbjTG,
|
201
|
+
[623554159],
|
202
|
+
345872794,
|
203
|
+
621040909,
|
204
|
+
926121238,
|
205
|
+
[:v, :kEe],
|
206
|
+
689561990,
|
207
|
+
838812795,
|
208
|
+
46835249,
|
209
|
+
172284993,
|
210
|
+
[803588660, 717203845],
|
211
|
+
[:d],
|
212
|
+
126893892,
|
213
|
+
:"8DBqlrWm",
|
214
|
+
139052367,
|
215
|
+
:"1",
|
216
|
+
927142311,
|
217
|
+
:Rhp,
|
218
|
+
192500452,
|
219
|
+
[16557598, 219816350],
|
220
|
+
[:Iv5x, [846371158]],
|
221
|
+
[953388069],
|
222
|
+
948311974,
|
223
|
+
[:rtNolMF, 368694274],
|
224
|
+
[[[[:"4fDM3cdfHp"]]]],
|
225
|
+
:vaxk68l6,
|
226
|
+
]
|
227
|
+
|
228
|
+
|
229
|
+
$small_string_array = [
|
230
|
+
"qeBC6HSLzlc1", "Kh5I7Lwi8VXx", "e22wAAKw75vS", "CEMJiXl3AowP", "J1LC5Offt8Ho", "arSQUdbOuE0D",
|
231
|
+
"VGEZnh1akOv6", "vZ7J50xgVi0s", "QWFR1XMJmBwA", "p0ubHERwLxHN", "g6mApz6W1SGJ", "JHUKWJjCxDSJ",
|
232
|
+
"mCTHnaJ1naZ0", "mOueb0OO1XMN", "OT3G6j2RE2Uo", "U5Z1t2PAvsyB", "XCYAYQn6znBa", "kEiGV2xfvyUq",
|
233
|
+
"SZlOmOC3C0Xs", "zmOc5KEp4C7p", "HkHkqmzKojCf", "XJOaEe0I1Vh4", "fyoeml3mCcJH", "z2N3EmJ7bDmt",
|
234
|
+
"XUQPEz0oYcyE", "soJgu8eTPgwB", "Eumlo8lLeu3l", "Yn533aM4tHb8", "Fo2VOQ32mSVK", "uZLVK0iERhWD",
|
235
|
+
"FoOxiw2TJDhI", "dh31roTWboBy", "qD6e0MzDSV4l", "vI74OAdOl0m1", "sAHaXD4xqPSV", "XkNJmcUsH4hp",
|
236
|
+
"cZj7BBiMidLg", "j6iay7E0IGya", "pHdhMOOnRIKK", "WdXBWPdGPcXx", "jWxiIuiKqlnN", "zGdpvKYDMtoV",
|
237
|
+
"jB0yCIkT7GUJ", "EzDS85c21PEc", "OaEQbxnaO4RC", "zN7XvRItFM61", "pQd2QATuA3ir", "0HFnFpPOJfNZ",
|
238
|
+
"hPjYccwBuTIq", "3aD6xbjgT0HZ", "tDT22JWXTo47", "dR0yKYdmvowi", "GrrfvXjTWs1i", "60UG6CQ3ewkf",
|
239
|
+
"eK86xZkqUYxa", "BVH7t2HMZHs5", "bQSTGVFNcsEO", "4vwbkoAl1E6S", "yHTkZL3dpanc", "dvt7dY1Z4Sbp",
|
240
|
+
"RrfFYuSyUagu", "oeIgfnLsdfj6", "oWqZ4mhfuVbK", "WttPzRy5oZ00", "BuIFWSc3KKeP", "GQYtH3wH2fQk",
|
241
|
+
"4bARLyv8tjjY", "DqP11xDYrWBg", "FUHjSeQ4ENHb", "kWgIRA2xMAPA", "YZkZlZj6QvBk", "eSy33KnKzO8m",
|
242
|
+
"ThdI4A7TF7Hi", "yCoAxzfbCYle", "YMMEEuxjdF74", "5SUmSExJJhF5", "MXvem5vIyjeT", "OKjmkl1jj406",
|
243
|
+
"Zlns3bgponkT", "buoAovP3ANPc", "ZdxogpNKy7Pz", "Cvnh3FCvyhAY", "xJIpV38mKpxR", "GxIAYZgwchCK",
|
244
|
+
"SoBVY1QtDkRR", "XfJKrN4lpcZ1", "hMvVOuei8Ufj", "lzb3iV8Ptc4x", "yuLikeu1IURU", "7mTUejcUdg40",
|
245
|
+
"QRaQCGo1qgpc", "7q1f8dJT6QWB", "gEjsj618rGm7", "lYZ3bdrZQz6b", "BbfOiADJFFDq", "NxB7Q83ZHtxv",
|
246
|
+
"oDwOkPtH2gbF", "htru2aWcjeSM", "pkYicysGcakp", "rd3dJb7wmSEc", "EiH7wTZ5R2D3", "T5TDaVmQczD7",
|
247
|
+
"0fMmB4S5CFKg", "akiqIjqyFpc4", "faMWVXRLZdfB", "8lrqBOogZjZo", "YmvvoPK0W7FB", "xuNuQzn7JlsL",
|
248
|
+
"yNy4MDN2Pz0U", "rf2yiyN76h3U", "VyDEGPg4jCnA", "OzxAI2eafLW7", "NCAwpWJiZ542", "f0v35dFjuaql",
|
249
|
+
"UK5oyuPzuq6j", "mnGG556DkHNP", "OKtUWhPskxfd", "eLWX6iOImHLQ", "gJ1H7vLnnFKH", "fU22QNRDdh8A",
|
250
|
+
"bpqZjYXRVhs4", "R6fgGTZHKRU8", "8JumbHaoOVA5", "RMoZoYC3bapq", "zrdfpg2ZFD01", "JwVZEKmtYCNN",
|
251
|
+
"pYOtKITtOYNW", "PrIJQ8UAImtf", "MFRF3D5EphmD", "whoorxVWT0By", "4TZRGOy0aeCy", "S8R8rijxCAw6",
|
252
|
+
"udq0BOtc7LbZ", "6PlNGn4FUUjs", "gF2Z58HukZ4H", "YhkLDYIBT4Vr", "bGAohJ1Exr8x", "1qxnFFQKOjP6",
|
253
|
+
"mji4WLC1jylI", "YLwBEjNondGJ", "siiavOGaAAPZ", "iAcC1fDNc5OR", "O7rynaBEdQw8", "pqWeB0gcOs2g",
|
254
|
+
"kAgwoK58ZicJ", "Kgj1aEVHJuUO", "B6SkecopszvH", "EK8syDXpitAW", "W51EhYxDZsew", "tLhqnsQdXqND",
|
255
|
+
"2LGoDOdI6CWH", "DWibM1ee21d7", "sqCaFzy3zScp", "xfZx33fNkwKV", "d6sCg0xhLbof", "K8k1stb2c1SX",
|
256
|
+
"YXxYq41GYkGl", "oekE5AuKdoS0", "XbhIPt0wSAnw", "Qx5PIzSgzGqp", "o8HvII6keSj3", "j186tPfI0ebB",
|
257
|
+
"2DPUoQ01kq5E", "YqKodpEGOIN8", "iyXF8kbF1nrc", "dIT1FGy5uRiI", "rj3zCPGG5Wna", "LEiW2ifgFIl2",
|
258
|
+
"yVACYsYHW5UF", "jnI7wkX4PQjO", "hR7vk3TCOPcV", "uDm0g0LSe8Dn", "NISqprTVGqET", "oeHpk7mzxNQG",
|
259
|
+
"tmmmG3qZgita", "3TcRnbJfp5ZH", "uiIeXUXNn2ZH", "0F60dFET46Yc", "tbHU7jgLqFvp", "bmFawiHAerwY",
|
260
|
+
"DPcGnpAMfpw6", "zSUICp0ugDAy", "ivz1nCRCockM", "bXzdeSgeUSW4", "pairIrJINaOa", "2IZuPFbtNm6U",
|
261
|
+
"VcYf0bvySao5", "EVYTaVzZgDFp", "q6sCKWk8VRaF", "6aMsLRYEWZzV", "e4REx5YNFtM6", "GDZfrNT6qiFm",
|
262
|
+
"LS206O3WhENJ", "G7NhC0HsL3ls", "rxZuGDqZ4AtJ", "I7bQ44vYVfte", "430UrIsWWaab", "YRdSHkiTZ3J5",
|
263
|
+
"TwHNShpObHYQ", "dxSg4PcH71nU"
|
264
|
+
]
|
265
|
+
|
266
|
+
|
267
|
+
$small_fixnum_array = [
|
268
|
+
347728297, 257683256, 578779314, 392222695, 408671424, 407970558, 812392640, 816577924, 115257099,
|
269
|
+
402351457, 792522571, 606803822, 544610941, 723197253, 426547220, 377445492, 822826294, 682892744,
|
270
|
+
554096615, 542755221, 671837237, 509647919, 851534465, 531024099, 709946972, 481735433, 353969015,
|
271
|
+
519648235, 48427274, 566510110, 192470787, 186886313, 902069737, 846031560, 60030853, 996261845,
|
272
|
+
633276290, 741573403, 457077568, 682268665, 775392729, 573619278, 720876370, 677808891, 61991492,
|
273
|
+
498306563, 379779184, 779798017, 549224675, 377051494, 332812925, 798908732, 860781792, 381312114,
|
274
|
+
611819871, 423272825, 437549428, 8583378, 968936714, 625238473, 170338972, 966017819, 846845654,
|
275
|
+
450588194, 876472524, 121332332, 52221083, 588840590, 443806208, 182695508, 87430824, 80349243,
|
276
|
+
168931148, 255018784, 614600618, 784669231, 31995577, 483869088, 601121162, 130624564, 371319233,
|
277
|
+
550379186, 921804880, 117261360, 536209011, 505027125, 925273209, 834351781, 68839499, 618168295,
|
278
|
+
19601458, 721476668, 209831873, 798446038, 417591480, 206124449, 302995390, 838939624, 420506939,
|
279
|
+
878585956, 324854622, 44063929, 536980406, 800909707, 340776410, 372732203, 57183324, 868804015,
|
280
|
+
642740517, 641789914, 732025573, 707843533, 334851271, 380888787, 809950344, 633968328, 385791579,
|
281
|
+
433957520, 374915776, 483882124, 609878969, 973251819, 185134734, 936246013, 188017820, 206037484,
|
282
|
+
618628399, 954825565, 282314109, 579663281, 94430702, 285707298, 847558107, 662169967, 96864252,
|
283
|
+
703915052, 789330467, 920098884, 851546773, 368055593, 822263587, 237490391, 629517804, 815061007,
|
284
|
+
302694980, 746130432, 247275243, 35232798, 781776777, 164086432, 272455893, 576173824, 375638276,
|
285
|
+
879718803, 310449906, 543657952, 23791806, 629934269, 129019767, 185106383, 221210724, 903426714,
|
286
|
+
325339586, 40343767, 495793257, 120958499, 840109377, 243617847, 965701164, 862627708, 453274628,
|
287
|
+
311310597, 730024775, 840524609, 760383311, 639044961, 391749908, 828147647, 285190947, 436797772,
|
288
|
+
45390801, 567254794, 453918915, 931881042, 624913131, 725521291, 505447917, 954878069, 360223958,
|
289
|
+
561638441, 25174779, 896656975, 419617963, 585784003, 637738870, 177657713, 921982818, 490418216,
|
290
|
+
736209263, 253028878
|
291
|
+
]
|
292
|
+
|
293
|
+
$small_time_array = $small_fixnum_array.map { |number| Time.at(number) }
|
data/lib/rubybench.rb
ADDED
data/rubybench.gemspec
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'rubybench/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "rubybench"
|
8
|
+
spec.version = Rubybench::VERSION
|
9
|
+
spec.authors = ["y8"]
|
10
|
+
spec.email = ["info@rubyben.ch"]
|
11
|
+
spec.summary = %q{Like a rubyspec, but for benchmarking}
|
12
|
+
spec.description = %q{Set of cases to measure ruby performance}
|
13
|
+
spec.homepage = "https://rubyben.ch/"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.7"
|
22
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
23
|
+
end
|
metadata
ADDED
@@ -0,0 +1,82 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rubybench
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1a
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- y8
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-08-15 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.7'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.7'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
description: Set of cases to measure ruby performance
|
42
|
+
email:
|
43
|
+
- info@rubyben.ch
|
44
|
+
executables: []
|
45
|
+
extensions: []
|
46
|
+
extra_rdoc_files: []
|
47
|
+
files:
|
48
|
+
- ".gitignore"
|
49
|
+
- Gemfile
|
50
|
+
- LICENSE.txt
|
51
|
+
- README.md
|
52
|
+
- Rakefile
|
53
|
+
- benchmarks/core/array/reject_bench.rb
|
54
|
+
- helpers/array.rb
|
55
|
+
- lib/rubybench.rb
|
56
|
+
- lib/rubybench/version.rb
|
57
|
+
- rubybench.gemspec
|
58
|
+
homepage: https://rubyben.ch/
|
59
|
+
licenses:
|
60
|
+
- MIT
|
61
|
+
metadata: {}
|
62
|
+
post_install_message:
|
63
|
+
rdoc_options: []
|
64
|
+
require_paths:
|
65
|
+
- lib
|
66
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
67
|
+
requirements:
|
68
|
+
- - ">="
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: '0'
|
71
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 1.3.1
|
76
|
+
requirements: []
|
77
|
+
rubyforge_project:
|
78
|
+
rubygems_version: 2.2.2
|
79
|
+
signing_key:
|
80
|
+
specification_version: 4
|
81
|
+
summary: Like a rubyspec, but for benchmarking
|
82
|
+
test_files: []
|