mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
Merge pull request #47 from walf443/fix/benchmark_ext_build_data
make benchmark to more accurate.
This commit is contained in:
commit
bb85aa7c83
1 changed files with 4 additions and 2 deletions
|
@ -9,7 +9,9 @@ require_relative '../utils/benchmark_ips_extension'
|
|||
h = { 'user' => { id: 1234, name: 'k0kubun' }, book_id: 5432 }
|
||||
|
||||
Benchmark.ips do |x|
|
||||
x.report("Faml::AB.build") { Faml::AttributeBuilder.build("'", true, nil, data: h) }
|
||||
x.report("Hamlit.build_data") { Hamlit::AttributeBuilder.build_data(true, "'", h) }
|
||||
quote = "'"
|
||||
faml_options = { data: h }
|
||||
x.report("Faml::AB.build") { Faml::AttributeBuilder.build(quote, true, nil, faml_options) }
|
||||
x.report("Hamlit.build_data") { Hamlit::AttributeBuilder.build_data(true, quote, h) }
|
||||
x.compare!
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue