4bb1977b78 (master): Fix perf. of RCLASS_EXT_WRITABLE

0 views
Skip to first unread message

Luke Gruber

unread,
May 14, 2026, 12:45:16 PM (11 days ago) May 14
to ruby...@g.ruby-lang.org
Luke Gruber 2026-05-14 13:58:46 +0000 (Thu, 14 May 2026)

New Revision: 4bb1977b78

https://github.com/ruby/ruby/commit/4bb1977b78

Log:
Fix perf. of RCLASS_EXT_WRITABLE

FL_TEST -> FL_TEST_RAW
FL_SET -> FL_SET_RAW

I was seeing bad performance on the ruby-bench getivar-module benchmark
when using yjit. This was with other changes in a branch, but changes
totally unrelated to accessing ivars on a class or using boxes. The
change to RCLASS_PRIME_CLASSEXT_WRITABLE_P was the one that made the
difference, but I changed a couple of other FL_SET uses as well. This
change reduced the benchmark runs from 60ms to 40ms.

Modified files:
internal/class.h
Reply all
Reply to author
Forward
0 new messages