9e6f76cb60 (master): mswin: Favor speed in vm.c

0 views
Skip to first unread message

Hiroshi SHIBATA

unread,
12:41 AM (17 hours ago) 12:41 AM
to ruby...@g.ruby-lang.org
Hiroshi SHIBATA 2026-10-05 23:41:38 +0000 (Mon, 05 Oct 2026)

New Revision: 9e6f76cb60

https://github.com/ruby/ruby/commit/9e6f76cb60

Log:
mswin: Favor speed in vm.c

With the default `-O2sy-`, cl.exe compiles the instruction dispatch in vm_exec_core into a binary search. Favoring speed only in vm.c gives it a jump table, while the rest of the DLL and the extensions that inherit OPTFLAGS through RbConfig stay optimized for size.

With reg_pc kept in a local, this makes 20 benchmarks about 20% faster on x64 and grows the DLL by about 1%.

Co-Authored-By: Claude Opus 5.5 <nor...@anthropic.com>

Modified files:
vm.c
Reply all
Reply to author
Forward
0 new messages