ruby / json

JSON implementation for Ruby
https://ruby.github.io/json
Other
673 stars 326 forks source link

Optimize key type check in `json_object_i` #598

Closed casperisfine closed 5 days ago

casperisfine commented 1 month ago

Rather than checking the class we can check the type. This is very subtly different for String subclasses, but I think it's OK.

We also save on checking the type again in the fast path.