File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,22 +46,24 @@ Idioms
4646
4747##### Parallel Assignment vs Sequential Assignment [ code] ( code/general/assignment.rb )
4848
49+ [ Read the rationale here] ( https://github.com/JuanitoFatas/fast-ruby/pull/50#issue-98586885 ) .
50+
4951```
5052$ ruby -v code/general/assignment.rb
51- ruby 2.2.1p85 (2015-02-26 revision 49769 ) [x86_64-darwin13 ]
53+ ruby 2.2.2p95 (2015-04-13 revision 50295 ) [x86_64-darwin14 ]
5254
5355Calculating -------------------------------------
54- Parallel Assignment 103.520k i/100ms
56+ Parallel Assignment 149.201k i/100ms
5557Sequential Assignment
56- 105.474k i/100ms
58+ 142.545k i/100ms
5759-------------------------------------------------
58- Parallel Assignment 7.049M (± 2.7 %) i/s - 35.300M
60+ Parallel Assignment 7.687M (± 6.9 %) i/s - 38.345M
5961Sequential Assignment
60- 6.159M (± 2.3 %) i/s - 30.798M
62+ 6.320M (± 8.5 %) i/s - 31.360M
6163
6264Comparison:
63- Parallel Assignment: 7048523.9 i/s
64- Sequential Assignment: 6159203.7 i/s - 1.14x slower
65+ Parallel Assignment: 7686954.1 i/s
66+ Sequential Assignment: 6320425.6 i/s - 1.22x slower
6567```
6668
6769##### ` begin...rescue ` vs ` respond_to? ` for Control Flow [ code] ( code/general/begin-rescue-vs-respond-to.rb )
You can’t perform that action at this time.
0 commit comments