Search
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Ruby
All Projects
Ruby
Overview
Activity
Roadmap
Issues
Repository
Like
«
Previous
|
Next
»
Revision c2d8d6eb
Added by
Eregon (Benoit Daloze)
over 1 year
ago
ID
c2d8d6eba6a1c9e51c2f2ae136e92468c6841472
Parent
1b2708b1
Child
f4a0e1cd
Initialize the Prism::Source directly with all 3 fields for the C extension
Faster that way:
$ ruby -Ilib -rprism -rbenchmark/ips -e 'Benchmark.ips { |x| x.report("parse") { Prism.parse("1 + 2") } }'
195.722k (± 0.5%) i/s
rb_iv_set():
179.609k (± 0.5%) i/s
rb_funcall():
190.030k (± 0.3%) i/s
before this PR:
183.319k (± 0.4%) i/s
Loading...
Initialize the Prism::Source directly with all 3 fields for the C extension
$ ruby -Ilib -rprism -rbenchmark/ips -e 'Benchmark.ips { |x| x.report("parse") { Prism.parse("1 + 2") } }'
195.722k (± 0.5%) i/s
rb_iv_set():
179.609k (± 0.5%) i/s
rb_funcall():
190.030k (± 0.3%) i/s
before this PR:
183.319k (± 0.4%) i/s