c568944b8f (master): [ruby/json] Force ensure_valid_encoding to be inlined.

0 views
Skip to first unread message

Scott Myron

unread,
Apr 20, 2026, 8:57:25 AM (16 hours ago) Apr 20
to ruby...@g.ruby-lang.org
Scott Myron 2026-04-20 03:49:05 +0000 (Mon, 20 Apr 2026)

New Revision: c568944b8f

https://github.com/ruby/ruby/commit/c568944b8f

Log:
[ruby/json] Force ensure_valid_encoding to be inlined.

And move the encoding convertion logic in another function with NOINLINE.

The overwelming majority of strings are correctly encoded, so we
want to inline the very cheap check, however we don't want to
inline the much larger piece of code required to re-encode the string
Reply all
Reply to author
Forward
0 new messages