@@ -62,6 +62,12 @@ def benchmark_parser
6262 end
6363
6464 alias reset_parser generic_reset_method
65+
66+ def benchmark_parser_symbolic
67+ @result = JSON . parse ( @json , :symbolize_names => true )
68+ end
69+
70+ alias reset_parser_symbolc generic_reset_method
6571end
6672
6773class ParserBenchmarkPure < Bullshit ::RepeatCase
@@ -92,6 +98,12 @@ def benchmark_parser
9298 end
9399
94100 alias reset_parser generic_reset_method
101+
102+ def benchmark_parser_symbolic
103+ @result = JSON . parse ( @json , :symbolize_names => true )
104+ end
105+
106+ alias reset_parser_symbolc generic_reset_method
95107end
96108
97109class ParserBenchmarkYAML < Bullshit ::RepeatCase
@@ -189,7 +201,9 @@ def generic_reset_method
189201 output_filename File . join ( File . dirname ( __FILE__ ) , 'data' , 'ParserBenchmarkComparison.log' )
190202
191203 benchmark ParserBenchmarkExt , :parser , :load => yes
204+ benchmark ParserBenchmarkExt , :parser_symbolic , :load => yes
192205 benchmark ParserBenchmarkPure , :parser , :load => yes
206+ benchmark ParserBenchmarkPure , :parser_symbolic , :load => yes
193207 benchmark ParserBenchmarkYAML , :parser , :load => yes
194208 benchmark ParserBenchmarkRails , :parser , :load => yes
195209 end
0 commit comments