Closed jperville closed 9 years ago
This PR contains several small performance fixes for json-ld.
The optimizations consist in:
Hash#each_key
Hash#keys.each
JSON::LD::Utils#debug
JSON::LD::Utils.node?
Hash#has_key?
Hash#merge!
Hash#merge
The specs still pass after all these changes.
This PR is the companion of ruby-rdf/rdf#213.
Cool, thanks.
This PR contains several small performance fixes for json-ld.
The optimizations consist in:
Hash#each_key
faster thanHash#keys.each
)JSON::LD::Utils#debug
that was executed even when debug is not onJSON::LD::Utils.node?
for severalHash#has_key?
callsHash#merge!
instead ofHash#merge
when appropriate and safeThe specs still pass after all these changes.