Fasterer speedup for hash_update_vs_hash_brackets
manjunath724 opened this issue · 1 comments
manjunath724 commented
Hash.update is an alias for Hash.merge!
Currently we have hash_merge_bang_vs_hash_brackets
which suggests us to replace Hash#merge!() with Hash#[] but it doesn't suggest for Hash#update().
Example
- hash.merge!({"key" => "value"}) -> offensive
- hash.update({"key" => value}) -> not offensive
Can we extend this to Hash.update()?
DamirSvrtan commented
Sounds good to me - would you be willing to document this speed up first in the https://github.com/JuanitoFatas/fast-ruby repository and then submit a PR to fasterer?
Thanks!