mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Optimize benchmark/vm_ivar_of_class
```
compare-ruby: ruby 3.5.0dev (2025-06-17T08:45:40Z master e9d35671d2
) +PRISM [arm64-darwin24]
last_commit=[ruby/json] Fix a typo
built-ruby: ruby 3.5.0dev (2025-06-17T09:27:05Z opt-getivar-for-cl.. ed1d7cd778) +PRISM [arm64-darwin24]
| |compare-ruby|built-ruby|
|:---------------------|-----------:|---------:|
|vm_ivar_of_class_set | 12.306M| 13.957M|
| | -| 1.13x|
|vm_ivar_of_class | 16.167M| 24.029M|
| | -| 1.49x|
```
This commit is contained in:
parent
9647dca143
commit
9e839d3c0e
Notes:
git
2025-06-17 11:00:43 +00:00
2 changed files with 2 additions and 2 deletions
|
@ -432,7 +432,7 @@ static inline rb_classext_t *
|
|||
RCLASS_EXT_WRITABLE(VALUE obj)
|
||||
{
|
||||
const rb_namespace_t *ns;
|
||||
if (RCLASS_PRIME_CLASSEXT_WRITABLE_P(obj)) {
|
||||
if (LIKELY(RCLASS_PRIME_CLASSEXT_WRITABLE_P(obj))) {
|
||||
return RCLASS_EXT_PRIME(obj);
|
||||
}
|
||||
// delay namespace loading to optimize for unmodified classes
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue