-
-
Save havenwood/da706eeb1a3b80aaac980743cb21a0b2 to your computer and use it in GitHub Desktop.
Instance and local off to the races!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>> Benchmark.ips do |ips| | |
| ips.report 'local' do | |
| ex = 1 | |
| ex | |
| end | |
| | |
| ips.report 'instance' do | |
| @ex = 1 | |
| @ex | |
| end | |
| end | |
Warming up -------------------------------------- | |
local 157.537k i/100ms | |
instance 148.740k i/100ms | |
Calculating ------------------------------------- | |
local 4.599M (± 5.0%) i/s - 23.000M | |
instance 3.769M (± 4.9%) i/s - 18.890M |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>> Benchmark.ips do |ips| | |
| ips.report 'local' do | |
| ex = 1 | |
| ex | |
| end | |
| | |
| ips.report 'instance' do | |
| @ex = 1 | |
| @ex | |
| end | |
| end | |
Warming up -------------------------------------- | |
local 186.040k i/100ms | |
instance 153.983k i/100ms | |
Calculating ------------------------------------- | |
local 14.143M (± 6.6%) i/s - 70.323M | |
instance 13.365M (± 7.7%) i/s - 66.367M |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment