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,82 @@
|
|
1
|
+
========================== 2009-04-01T16:49:55 CEST ===========================
|
2
|
+
Benchmarking on ruby 1.8.6 (2008-08-11 patchlevel 287) [i686-linux].
|
3
|
+
Running 'GeneratorBenchmarkRails' for 1000 iterations/method (compare_time=real)
|
4
|
+
===============================================================================
|
5
|
+
|
6
|
+
This first run is only for warmup.
|
7
|
+
GeneratorBenchmarkRails#generator:
|
8
|
+
real total user system
|
9
|
+
sum 25.871086597 25.820000000 25.780000000 0.040000000
|
10
|
+
min 0.021485090 0.020000000 0.020000000 0.000000000
|
11
|
+
std- 0.013123732 0.012534515 0.012507179 -0.000591505
|
12
|
+
mean 0.025871087 0.025820000 0.025780000 0.000040000
|
13
|
+
std+ 0.038618441 0.039105485 0.039052821 0.000671505
|
14
|
+
max 0.084933996 0.090000000 0.090000000 0.010000000
|
15
|
+
std 0.012747354 0.013285485 0.013272821 0.000631505
|
16
|
+
std% 49.272590131 51.454239794 51.484952060 1578.762962731
|
17
|
+
harm 0.023654431 0.022959497 0.022933171 nan
|
18
|
+
geo 0.024373445 0.023988580 0.023955348 0.000000000
|
19
|
+
q1 0.021737874 0.020000000 0.020000000 0.000000000
|
20
|
+
med 0.022677064 0.020000000 0.020000000 0.000000000
|
21
|
+
q3 0.023290575 0.030000000 0.030000000 0.000000000
|
22
|
+
1000 38.65319 0.025871087
|
23
|
+
calls calls/sec secs/call
|
24
|
+
|
25
|
+
0.08176 -|*
|
26
|
+
0.07542 -|**
|
27
|
+
0.06907 -|
|
28
|
+
0.06273 -|
|
29
|
+
0.05638 -|
|
30
|
+
0.05004 -|
|
31
|
+
0.04369 -|
|
32
|
+
0.03735 -|
|
33
|
+
0.03100 -|*
|
34
|
+
0.02466 -|**************************************************
|
35
|
+
|
36
|
+
Outliers detected with box plot algo (median=0.02268, iqr=0.00155, factor=3.00):
|
37
|
+
high=115 very_high=69
|
38
|
+
|
39
|
+
Ljung-Box statistics: q=1246.12050 (alpha=0.05, df=50).
|
40
|
+
1.00000 >= 0.95000 => Autocorrelation was detected.
|
41
|
+
|
42
|
+
GeneratorBenchmarkRails#generator:
|
43
|
+
real total user system
|
44
|
+
sum 25.952543497 25.950000000 25.930000000 0.020000000
|
45
|
+
min 0.021454096 0.020000000 0.020000000 0.000000000
|
46
|
+
std- 0.013029796 0.012272113 0.012258057 -0.000426990
|
47
|
+
mean 0.025952543 0.025950000 0.025930000 0.000020000
|
48
|
+
std+ 0.038875291 0.039627887 0.039601943 0.000466990
|
49
|
+
max 0.083282948 0.090000000 0.090000000 0.010000000
|
50
|
+
std 0.012922747 0.013677887 0.013671943 0.000446990
|
51
|
+
std% 49.793760083 52.708619269 52.726351240 2234.948544149
|
52
|
+
harm 0.023675798 0.022977187 0.022963996 nan
|
53
|
+
geo 0.024414095 0.024037524 0.024020868 0.000000000
|
54
|
+
q1 0.021728516 0.020000000 0.020000000 0.000000000
|
55
|
+
med 0.022745013 0.020000000 0.020000000 0.000000000
|
56
|
+
q3 0.023253679 0.030000000 0.030000000 0.000000000
|
57
|
+
1000 38.53187 0.025952543
|
58
|
+
calls calls/sec secs/call
|
59
|
+
|
60
|
+
0.08019 -|**
|
61
|
+
0.07401 -|*
|
62
|
+
0.06783 -|
|
63
|
+
0.06164 -|
|
64
|
+
0.05546 -|
|
65
|
+
0.04928 -|
|
66
|
+
0.04309 -|
|
67
|
+
0.03691 -|
|
68
|
+
0.03073 -|*
|
69
|
+
0.02455 -|**************************************************
|
70
|
+
|
71
|
+
Outliers detected with box plot algo (median=0.02275, iqr=0.00153, factor=3.00):
|
72
|
+
high=106 very_high=75
|
73
|
+
|
74
|
+
Ljung-Box statistics: q=1270.99317 (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
|
+
========================== 2009-04-01T16:50:50 CEST ===========================
|
80
|
+
|
81
|
+
Writing measurement data file '/data/scm/json/benchmarks/data/GeneratorBenchmarkRails#generator.dat'.
|
82
|
+
Writing autocorrelation plot file '/data/scm/json/benchmarks/data/GeneratorBenchmarkRails#generator-autocorrelation.dat'.
|
@@ -0,0 +1,34 @@
|
|
1
|
+
========================== 2009-04-01T16:49:51 CEST ===========================
|
2
|
+
|
3
|
+
Comparing times (call_time_mean):
|
4
|
+
1 ParserBenchmarkExt#parser 900 repeats:
|
5
|
+
553.922304770 ( real) -> 21.500x
|
6
|
+
0.001805307
|
7
|
+
2 ParserBenchmarkYAML#parser 1000 repeats:
|
8
|
+
224.513358139 ( real) -> 8.714x
|
9
|
+
0.004454078
|
10
|
+
3 ParserBenchmarkPure#parser 1000 repeats:
|
11
|
+
26.755020642 ( real) -> 1.038x
|
12
|
+
0.037376163
|
13
|
+
4 ParserBenchmarkRails#parser 1000 repeats:
|
14
|
+
25.763381731 ( real) -> 1.000x
|
15
|
+
0.038814780
|
16
|
+
calls/sec ( time) -> speed covers
|
17
|
+
secs/call
|
18
|
+
|
19
|
+
Comparing times (call_time_median):
|
20
|
+
1 ParserBenchmarkExt#parser 900 repeats:
|
21
|
+
800.592479481 ( real) -> 26.936x
|
22
|
+
0.001249075
|
23
|
+
2 ParserBenchmarkYAML#parser 1000 repeats:
|
24
|
+
271.002390644 ( real) -> 9.118x
|
25
|
+
0.003690004
|
26
|
+
3 ParserBenchmarkRails#parser 1000 repeats:
|
27
|
+
30.227910865 ( real) -> 1.017x
|
28
|
+
0.033082008
|
29
|
+
4 ParserBenchmarkPure#parser 1000 repeats:
|
30
|
+
29.722384421 ( real) -> 1.000x
|
31
|
+
0.033644676
|
32
|
+
calls/sec ( time) -> speed covers
|
33
|
+
secs/call
|
34
|
+
===============================================================================
|