Skip to content

Commit 463a82f

Browse files
author
Charlie Somerville
committed
update assignment benchmark in README
1 parent eb84297 commit 463a82f

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,22 +41,22 @@ Idioms
4141

4242
##### Parallel Assignment vs Sequential Assignment [code](code/general/assignment.rb)
4343

44-
> Parallel Assignment allocates an extra array.
45-
4644
```
4745
$ ruby -v code/general/assignment.rb
48-
ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-darwin14]
46+
ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-darwin13]
4947
5048
Calculating -------------------------------------
51-
Parallel Assignment 99.146k i/100ms
52-
Sequential Assignment 127.143k i/100ms
49+
Parallel Assignment 103.520k i/100ms
50+
Sequential Assignment
51+
105.474k i/100ms
5352
-------------------------------------------------
54-
Parallel Assignment 2.522M (± 7.5%) i/s - 12.592M
55-
Sequential Assignment 5.686M (± 8.6%) i/s - 28.226M
53+
Parallel Assignment 7.049M (± 2.7%) i/s - 35.300M
54+
Sequential Assignment
55+
6.159M (± 2.3%) i/s - 30.798M
5656
5757
Comparison:
58-
Sequential Assignment: 5685750.0 i/s
59-
Parallel Assignment: 2521708.9 i/s - 2.25x slower
58+
Parallel Assignment: 7048523.9 i/s
59+
Sequential Assignment: 6159203.7 i/s - 1.14x slower
6060
```
6161

6262
##### `begin...rescue` vs `respond_to?` for Control Flow [code](code/general/begin-rescue-vs-respond-to.rb)

0 commit comments

Comments
 (0)