@@ -462,11 +462,12 @@ Comparison:
462
462
463
463
##### ` Hash#fetch ` with argument vs ` Hash#fetch ` + block [ code] ( code/hash/fetch-vs-fetch-with-block.rb )
464
464
465
- > Note that the speedup in the block version comes from avoiding repeated
466
- > construction of the argument. If the argument is a constant, number symbol or
467
- > something of that sort the argument version is actually slightly faster
465
+ > Note that the speedup in the block version comes from avoiding repeated < br >
466
+ > construction of the argument. If the argument is a constant, number symbol or < br >
467
+ > something of that sort the argument version is actually slightly faster < br >
468
468
> See also [ #39 (comment)] ( https://github.com/JuanitoFatas/fast-ruby/issues/39#issuecomment-103989335 )
469
469
470
+ ```
470
471
$ ruby -v code/hash/fetch-vs-fetch-with-block.rb
471
472
ruby 2.2.0p0 (2014-12-25 revision 49005) [x86_64-darwin13]
472
473
Calculating -------------------------------------
@@ -482,6 +483,7 @@ Comparison:
482
483
Hash#fetch + const: 7030600.4 i/s
483
484
Hash#fetch + block: 6814826.7 i/s - 1.03x slower
484
485
Hash#fetch + arg: 4752567.2 i/s - 1.48x slower
486
+ ```
485
487
486
488
##### ` Hash#each_key ` instead of ` Hash#keys.each ` [ code] ( code/hash/keys-each-vs-each_key.rb )
487
489
@@ -544,7 +546,7 @@ Comparison:
544
546
545
547
##### ` {}#merge!(Hash) ` vs ` Hash#merge({}) ` vs ` Hash#dup#merge!({}) ` [ code] ( code/hash/merge-bang-vs-merge-vs-dup-merge-bang.rb )
546
548
547
- > When we don't want to modify the original hash, and we want duplicates to be created
549
+ > When we don't want to modify the original hash, and we want duplicates to be created < br >
548
550
> See [ #42 ] ( https://github.com/JuanitoFatas/fast-ruby/pull/42#issue-93502261 ) for more details.
549
551
550
552
```
0 commit comments