Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

benchmark symbolized names

  • Loading branch information...
commit 14d97def3f9a3fed4d0b5721144bb60fe481896b 1 parent 5f420de
@flori flori authored
Showing with 14 additions and 0 deletions.
  1. +14 −0 benchmarks/parser_benchmark.rb
View
14 benchmarks/parser_benchmark.rb
@@ -62,6 +62,12 @@ def benchmark_parser
end
alias reset_parser generic_reset_method
+
+ def benchmark_parser_symbolic
+ @result = JSON.parse(@json, :symbolize_names => true)
+ end
+
+ alias reset_parser_symbolc generic_reset_method
end
class ParserBenchmarkPure < Bullshit::RepeatCase
@@ -92,6 +98,12 @@ def benchmark_parser
end
alias reset_parser generic_reset_method
+
+ def benchmark_parser_symbolic
+ @result = JSON.parse(@json, :symbolize_names => true)
+ end
+
+ alias reset_parser_symbolc generic_reset_method
end
class ParserBenchmarkYAML < Bullshit::RepeatCase
@@ -189,7 +201,9 @@ def generic_reset_method
output_filename File.join(File.dirname(__FILE__), 'data', 'ParserBenchmarkComparison.log')
benchmark ParserBenchmarkExt, :parser, :load => yes
+ benchmark ParserBenchmarkExt, :parser_symbolic, :load => yes
benchmark ParserBenchmarkPure, :parser, :load => yes
+ benchmark ParserBenchmarkPure, :parser_symbolic, :load => yes
benchmark ParserBenchmarkYAML, :parser, :load => yes
benchmark ParserBenchmarkRails, :parser, :load => yes
end
Please sign in to comment.
Something went wrong with that request. Please try again.