json_pure 1.1.3 → 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +9 -0
- data/Rakefile +47 -53
- data/VERSION +1 -1
- data/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkComparison.log +52 -0
- data/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_fast-autocorrelation.dat +1000 -0
- data/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_fast.dat +1001 -0
- data/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_pretty-autocorrelation.dat +900 -0
- data/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_pretty.dat +901 -0
- data/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_safe-autocorrelation.dat +1000 -0
- data/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt#generator_safe.dat +1001 -0
- data/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkExt.log +261 -0
- data/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_fast-autocorrelation.dat +1000 -0
- data/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_fast.dat +1001 -0
- data/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_pretty-autocorrelation.dat +1000 -0
- data/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_pretty.dat +1001 -0
- data/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_safe-autocorrelation.dat +1000 -0
- data/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure#generator_safe.dat +1001 -0
- data/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkPure.log +262 -0
- data/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails#generator-autocorrelation.dat +1000 -0
- data/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails#generator.dat +1001 -0
- data/benchmarks/data-p4-3GHz-ruby18/GeneratorBenchmarkRails.log +82 -0
- data/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkComparison.log +34 -0
- data/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt#parser-autocorrelation.dat +900 -0
- data/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt#parser.dat +901 -0
- data/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkExt.log +81 -0
- data/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure#parser-autocorrelation.dat +1000 -0
- data/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure#parser.dat +1001 -0
- data/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkPure.log +82 -0
- data/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails#parser-autocorrelation.dat +1000 -0
- data/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails#parser.dat +1001 -0
- data/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkRails.log +82 -0
- data/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML#parser-autocorrelation.dat +1000 -0
- data/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML#parser.dat +1001 -0
- data/benchmarks/data-p4-3GHz-ruby18/ParserBenchmarkYAML.log +82 -0
- data/benchmarks/generator_benchmark.rb +162 -0
- data/benchmarks/parser_benchmark.rb +193 -0
- data/bin/edit_json.rb +0 -1
- data/bin/prettify_json.rb +0 -1
- data/doc-templates/main.txt +284 -0
- data/ext/json/ext/generator/extconf.rb +2 -0
- data/ext/json/ext/generator/generator.c +62 -18
- data/ext/json/ext/parser/extconf.rb +2 -0
- data/ext/json/ext/parser/parser.c +128 -81
- data/ext/json/ext/parser/parser.rl +31 -7
- data/ext/json/ext/parser/unicode.c +4 -4
- data/lib/json/add/core.rb +1 -1
- data/lib/json/editor.rb +11 -2
- data/lib/json/ext.rb +2 -0
- data/lib/json/pure/generator.rb +77 -41
- data/lib/json/pure/parser.rb +6 -2
- data/lib/json/pure.rb +2 -0
- data/lib/json/version.rb +1 -1
- data/lib/json.rb +0 -221
- data/tests/test_json.rb +7 -4
- data/tests/test_json_addition.rb +8 -5
- data/tests/test_json_fixtures.rb +6 -2
- data/tests/test_json_generate.rb +8 -2
- data/tests/test_json_rails.rb +30 -2
- data/tests/test_json_unicode.rb +8 -7
- data/tools/fuzz.rb +0 -1
- data/tools/server.rb +0 -1
- metadata +46 -9
- data/benchmarks/benchmark.txt +0 -133
- data/benchmarks/benchmark_generator.rb +0 -48
- data/benchmarks/benchmark_parser.rb +0 -26
- data/benchmarks/benchmark_rails.rb +0 -26
- data/tests/runner.rb +0 -25
@@ -0,0 +1,262 @@
|
|
1
|
+
========================== 2009-04-01T16:50:52 CEST ===========================
|
2
|
+
Benchmarking on ruby 1.8.6 (2008-08-11 patchlevel 287) [i686-linux].
|
3
|
+
Running 'GeneratorBenchmarkPure' for 1000 iterations/method (compare_time=real)
|
4
|
+
===============================================================================
|
5
|
+
|
6
|
+
This first run is only for warmup.
|
7
|
+
GeneratorBenchmarkPure#generator_pretty:
|
8
|
+
real total user system
|
9
|
+
sum 27.356301069 27.380000000 27.370000000 0.010000000
|
10
|
+
min 0.022372007 0.020000000 0.020000000 0.000000000
|
11
|
+
std- 0.018178834 0.017248947 0.017256376 -0.000306228
|
12
|
+
mean 0.027356301 0.027380000 0.027370000 0.000010000
|
13
|
+
std+ 0.036533768 0.037511053 0.037483624 0.000326228
|
14
|
+
max 0.059602976 0.060000000 0.060000000 0.010000000
|
15
|
+
std 0.009177467 0.010131053 0.010113624 0.000316228
|
16
|
+
std% 33.547909026 37.001655096 36.951493429 3162.277660168
|
17
|
+
harm 0.025499974 0.024719842 0.024716787 nan
|
18
|
+
geo 0.026258699 0.025883656 0.025877881 0.000000000
|
19
|
+
q1 0.023006916 0.020000000 0.020000000 0.000000000
|
20
|
+
med 0.023234129 0.020000000 0.020000000 0.000000000
|
21
|
+
q3 0.024879038 0.030000000 0.030000000 0.000000000
|
22
|
+
1000 36.55465 0.027356301
|
23
|
+
calls calls/sec secs/call
|
24
|
+
|
25
|
+
0.05774 -|
|
26
|
+
0.05402 -|*
|
27
|
+
0.05030 -|****
|
28
|
+
0.04657 -|***
|
29
|
+
0.04285 -|
|
30
|
+
0.03913 -|
|
31
|
+
0.03540 -|
|
32
|
+
0.03168 -|*
|
33
|
+
0.02796 -|***
|
34
|
+
0.02423 -|**************************************************
|
35
|
+
|
36
|
+
Outliers detected with box plot algo (median=0.02323, iqr=0.00187, factor=3.00):
|
37
|
+
high=72 very_high=150
|
38
|
+
|
39
|
+
Ljung-Box statistics: q=3705.61130 (alpha=0.05, df=50).
|
40
|
+
1.00000 >= 0.95000 => Autocorrelation was detected.
|
41
|
+
|
42
|
+
GeneratorBenchmarkPure#generator_pretty:
|
43
|
+
real total user system
|
44
|
+
sum 27.569372892 27.540000000 27.530000000 0.010000000
|
45
|
+
min 0.022536039 0.020000000 0.020000000 0.000000000
|
46
|
+
std- 0.018335894 0.017329581 0.017326902 -0.000306228
|
47
|
+
mean 0.027569373 0.027540000 0.027530000 0.000010000
|
48
|
+
std+ 0.036802852 0.037750419 0.037733098 0.000326228
|
49
|
+
max 0.056230068 0.060000000 0.060000000 0.010000000
|
50
|
+
std 0.009233479 0.010210419 0.010203098 0.000316228
|
51
|
+
std% 33.491797772 37.074868658 37.061742557 3162.277660168
|
52
|
+
harm 0.025675439 0.024841635 0.024836493 nan
|
53
|
+
geo 0.026453993 0.026024721 0.026017235 0.000000000
|
54
|
+
q1 0.023056030 0.020000000 0.020000000 0.000000000
|
55
|
+
med 0.023363113 0.020000000 0.020000000 0.000000000
|
56
|
+
q3 0.025253892 0.030000000 0.030000000 0.000000000
|
57
|
+
1000 36.27213 0.027569373
|
58
|
+
calls calls/sec secs/call
|
59
|
+
|
60
|
+
0.05455 -|*
|
61
|
+
0.05118 -|**
|
62
|
+
0.04781 -|******
|
63
|
+
0.04444 -|
|
64
|
+
0.04107 -|
|
65
|
+
0.03770 -|
|
66
|
+
0.03433 -|
|
67
|
+
0.03096 -|*
|
68
|
+
0.02759 -|*****
|
69
|
+
0.02422 -|**************************************************
|
70
|
+
|
71
|
+
Outliers detected with box plot algo (median=0.02336, iqr=0.00220, factor=3.00):
|
72
|
+
high=67 very_high=148
|
73
|
+
|
74
|
+
Ljung-Box statistics: q=3212.48820 (alpha=0.05, df=50).
|
75
|
+
1.00000 >= 0.95000 => Autocorrelation was detected.
|
76
|
+
|
77
|
+
No initial data truncated.
|
78
|
+
=> System may have been in a steady state from the beginning.
|
79
|
+
-------------------------------------------------------------------------------
|
80
|
+
|
81
|
+
This first run is only for warmup.
|
82
|
+
GeneratorBenchmarkPure#generator_safe:
|
83
|
+
real total user system
|
84
|
+
sum 26.869803667 26.870000000 26.870000000 0.000000000
|
85
|
+
min 0.022134781 0.020000000 0.020000000 0.000000000
|
86
|
+
std- 0.017763505 0.016750439 0.016750439 0.000000000
|
87
|
+
mean 0.026869804 0.026870000 0.026870000 0.000000000
|
88
|
+
std+ 0.035976103 0.036989561 0.036989561 0.000000000
|
89
|
+
max 0.054952860 0.060000000 0.060000000 0.000000000
|
90
|
+
std 0.009106299 0.010119561 0.010119561 0.000000000
|
91
|
+
std% 33.890455748 37.661185483 37.661185483 nan
|
92
|
+
harm 0.024986876 0.024236549 0.024236549 nan
|
93
|
+
geo 0.025759291 0.025373850 0.025373850 0.000000000
|
94
|
+
q1 0.022480011 0.020000000 0.020000000 0.000000000
|
95
|
+
med 0.022669554 0.020000000 0.020000000 0.000000000
|
96
|
+
q3 0.024562180 0.030000000 0.030000000 0.000000000
|
97
|
+
1000 37.21650 0.026869804
|
98
|
+
calls calls/sec secs/call
|
99
|
+
|
100
|
+
0.05331 -|*
|
101
|
+
0.05003 -|**
|
102
|
+
0.04675 -|*******
|
103
|
+
0.04347 -|
|
104
|
+
0.04018 -|
|
105
|
+
0.03690 -|
|
106
|
+
0.03362 -|
|
107
|
+
0.03034 -|*
|
108
|
+
0.02706 -|****
|
109
|
+
0.02378 -|**************************************************
|
110
|
+
|
111
|
+
Outliers detected with box plot algo (median=0.02267, iqr=0.00208, factor=3.00):
|
112
|
+
high=77 very_high=149
|
113
|
+
|
114
|
+
Ljung-Box statistics: q=3100.69443 (alpha=0.05, df=50).
|
115
|
+
1.00000 >= 0.95000 => Autocorrelation was detected.
|
116
|
+
|
117
|
+
GeneratorBenchmarkPure#generator_safe:
|
118
|
+
real total user system
|
119
|
+
sum 27.079979420 27.040000000 27.030000000 0.010000000
|
120
|
+
min 0.022160053 0.020000000 0.020000000 0.000000000
|
121
|
+
std- 0.017839790 0.016756803 0.016774061 -0.000306228
|
122
|
+
mean 0.027079979 0.027040000 0.027030000 0.000010000
|
123
|
+
std+ 0.036320169 0.037323197 0.037285939 0.000326228
|
124
|
+
max 0.056457043 0.060000000 0.060000000 0.010000000
|
125
|
+
std 0.009240189 0.010283197 0.010255939 0.000316228
|
126
|
+
std% 34.121847738 38.029575352 37.942800504 3162.277660168
|
127
|
+
harm 0.025134510 0.024331887 0.024329914 nan
|
128
|
+
geo 0.025935574 0.025501913 0.025497264 0.000000000
|
129
|
+
q1 0.022511005 0.020000000 0.020000000 0.000000000
|
130
|
+
med 0.022763968 0.020000000 0.020000000 0.000000000
|
131
|
+
q3 0.024686873 0.030000000 0.030000000 0.000000000
|
132
|
+
1000 36.92765 0.027079979
|
133
|
+
calls calls/sec secs/call
|
134
|
+
|
135
|
+
0.05474 -|
|
136
|
+
0.05131 -|*
|
137
|
+
0.04788 -|********
|
138
|
+
0.04445 -|
|
139
|
+
0.04102 -|
|
140
|
+
0.03759 -|
|
141
|
+
0.03416 -|
|
142
|
+
0.03073 -|*
|
143
|
+
0.02730 -|***
|
144
|
+
0.02387 -|**************************************************
|
145
|
+
|
146
|
+
Outliers detected with box plot algo (median=0.02276, iqr=0.00218, factor=3.00):
|
147
|
+
high=53 very_high=158
|
148
|
+
|
149
|
+
Ljung-Box statistics: q=3263.81737 (alpha=0.05, df=50).
|
150
|
+
1.00000 >= 0.95000 => Autocorrelation was detected.
|
151
|
+
|
152
|
+
No initial data truncated.
|
153
|
+
=> System may have been in a steady state from the beginning.
|
154
|
+
-------------------------------------------------------------------------------
|
155
|
+
|
156
|
+
This first run is only for warmup.
|
157
|
+
GeneratorBenchmarkPure#generator_fast:
|
158
|
+
real total user system
|
159
|
+
sum 19.930217266 19.900000000 19.900000000 0.000000000
|
160
|
+
min 0.015556812 0.010000000 0.010000000 0.000000000
|
161
|
+
std- 0.010984683 0.009865525 0.009865525 0.000000000
|
162
|
+
mean 0.019930217 0.019900000 0.019900000 0.000000000
|
163
|
+
std+ 0.028875752 0.029934475 0.029934475 0.000000000
|
164
|
+
max 0.048508883 0.050000000 0.050000000 0.000000000
|
165
|
+
std 0.008945535 0.010034475 0.010034475 0.000000000
|
166
|
+
std% 44.884280314 50.424498030 50.424498030 nan
|
167
|
+
harm 0.017806422 0.016056519 0.016056519 nan
|
168
|
+
geo 0.018618502 0.017792091 0.017792091 0.000000000
|
169
|
+
q1 0.015833676 0.010000000 0.010000000 0.000000000
|
170
|
+
med 0.016059995 0.020000000 0.020000000 0.000000000
|
171
|
+
q3 0.016686678 0.020000000 0.020000000 0.000000000
|
172
|
+
1000 50.17507 0.019930217
|
173
|
+
calls calls/sec secs/call
|
174
|
+
|
175
|
+
0.04686 -|
|
176
|
+
0.04357 -|**
|
177
|
+
0.04027 -|******
|
178
|
+
0.03698 -|
|
179
|
+
0.03368 -|
|
180
|
+
0.03039 -|
|
181
|
+
0.02709 -|
|
182
|
+
0.02379 -|*
|
183
|
+
0.02050 -|**
|
184
|
+
0.01720 -|**************************************************
|
185
|
+
|
186
|
+
Outliers detected with box plot algo (median=0.01606, iqr=0.00085, factor=3.00):
|
187
|
+
high=46 very_high=180
|
188
|
+
|
189
|
+
Ljung-Box statistics: q=3486.59836 (alpha=0.05, df=50).
|
190
|
+
1.00000 >= 0.95000 => Autocorrelation was detected.
|
191
|
+
|
192
|
+
GeneratorBenchmarkPure#generator_fast:
|
193
|
+
real total user system
|
194
|
+
sum 20.008520842 19.960000000 19.950000000 0.010000000
|
195
|
+
min 0.015434027 0.010000000 0.010000000 0.000000000
|
196
|
+
std- 0.010882230 0.009581845 0.009596030 -0.000306228
|
197
|
+
mean 0.020008521 0.019960000 0.019950000 0.000010000
|
198
|
+
std+ 0.029134812 0.030338155 0.030303970 0.000326228
|
199
|
+
max 0.047976971 0.050000000 0.050000000 0.010000000
|
200
|
+
std 0.009126291 0.010378155 0.010353970 0.000316228
|
201
|
+
std% 45.612021047 51.994765712 51.899601404 3162.277660168
|
202
|
+
harm 0.017787111 0.015944725 0.015943454 nan
|
203
|
+
geo 0.018637889 0.017737808 0.017733851 0.000000000
|
204
|
+
q1 0.015746295 0.010000000 0.010000000 0.000000000
|
205
|
+
med 0.015944481 0.020000000 0.020000000 0.000000000
|
206
|
+
q3 0.016811609 0.020000000 0.020000000 0.000000000
|
207
|
+
1000 49.97871 0.020008521
|
208
|
+
calls calls/sec secs/call
|
209
|
+
|
210
|
+
0.04635 -|*
|
211
|
+
0.04310 -|**
|
212
|
+
0.03984 -|*******
|
213
|
+
0.03659 -|
|
214
|
+
0.03333 -|
|
215
|
+
0.03008 -|
|
216
|
+
0.02682 -|
|
217
|
+
0.02357 -|
|
218
|
+
0.02032 -|***
|
219
|
+
0.01706 -|**************************************************
|
220
|
+
|
221
|
+
Outliers detected with box plot algo (median=0.01594, iqr=0.00107, factor=3.00):
|
222
|
+
high=64 very_high=166
|
223
|
+
|
224
|
+
Ljung-Box statistics: q=2965.93220 (alpha=0.05, df=50).
|
225
|
+
1.00000 >= 0.95000 => Autocorrelation was detected.
|
226
|
+
|
227
|
+
No initial data truncated.
|
228
|
+
=> System may have been in a steady state from the beginning.
|
229
|
+
========================== 2009-04-01T16:53:33 CEST ===========================
|
230
|
+
|
231
|
+
Comparing times (call_time_mean):
|
232
|
+
1 GeneratorBenchmarkPure#generator_fast 1000 repeats:
|
233
|
+
49.978706968 ( real) -> 1.378x
|
234
|
+
0.020008521
|
235
|
+
2 GeneratorBenchmarkPure#generator_safe 1000 repeats:
|
236
|
+
36.927649925 ( real) -> 1.018x 3 (>=3859)
|
237
|
+
0.027079979
|
238
|
+
3 GeneratorBenchmarkPure#generator_pretty 1000 repeats:
|
239
|
+
36.272134441 ( real) -> 1.000x 2 (>=3859)
|
240
|
+
0.027569373
|
241
|
+
calls/sec ( time) -> speed covers
|
242
|
+
secs/call
|
243
|
+
|
244
|
+
Comparing times (call_time_median):
|
245
|
+
1 GeneratorBenchmarkPure#generator_fast 1000 repeats:
|
246
|
+
62.717626652 ( real) -> 1.465x
|
247
|
+
0.015944481
|
248
|
+
2 GeneratorBenchmarkPure#generator_safe 1000 repeats:
|
249
|
+
43.929073409 ( real) -> 1.026x 3 (>=3859)
|
250
|
+
0.022763968
|
251
|
+
3 GeneratorBenchmarkPure#generator_pretty 1000 repeats:
|
252
|
+
42.802514491 ( real) -> 1.000x 2 (>=3859)
|
253
|
+
0.023363113
|
254
|
+
calls/sec ( time) -> speed covers
|
255
|
+
secs/call
|
256
|
+
===============================================================================
|
257
|
+
Writing measurement data file '/data/scm/json/benchmarks/data/GeneratorBenchmarkPure#generator_pretty.dat'.
|
258
|
+
Writing autocorrelation plot file '/data/scm/json/benchmarks/data/GeneratorBenchmarkPure#generator_pretty-autocorrelation.dat'.
|
259
|
+
Writing measurement data file '/data/scm/json/benchmarks/data/GeneratorBenchmarkPure#generator_safe.dat'.
|
260
|
+
Writing autocorrelation plot file '/data/scm/json/benchmarks/data/GeneratorBenchmarkPure#generator_safe-autocorrelation.dat'.
|
261
|
+
Writing measurement data file '/data/scm/json/benchmarks/data/GeneratorBenchmarkPure#generator_fast.dat'.
|
262
|
+
Writing autocorrelation plot file '/data/scm/json/benchmarks/data/GeneratorBenchmarkPure#generator_fast-autocorrelation.dat'.
|