-
Notifications
You must be signed in to change notification settings - Fork 14
Closed
ruby/ruby
#15251Description
Currently it's a call to rb_obj_frozen_p() but that's pretty slow, e.g. on benchmarks/structaset.rb it's 6ms per iter without GuardNotFrozen and 18ms with.
Given most frozen checks are going to be on non-immediates (immediates are frozen and would raise FrozenError), it seems good to check the frozen state via the Shape, which also knows whether an object is frozen (IIRC).
Or via the RBasic flags but directly in generated code and not through a C call.
Metadata
Metadata
Assignees
Labels
No labels