Skip to content

Commit

Permalink
Speed up args_setup_kw_parameters_lookup which is only called with IDs
Browse files Browse the repository at this point in the history
The macro provided by symbol.h uses STATIC_ID2SYM
when it can which speeds up methods that declare keyword args.

Co-authored-by: Alan Wu <XrXr@users.noreply.github.com>
Co-authored-by: Takashi Kokubun (k0kubun) <takashikkbn@gmail.com>
Co-authored-by: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com>
Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
  • Loading branch information
5 people committed Dec 5, 2024
1 parent 7ccad5b commit 6e4bb56
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20049,6 +20049,7 @@ vm.$(OBJEXT): {$(VPATH)}rubyparser.h
vm.$(OBJEXT): {$(VPATH)}shape.h
vm.$(OBJEXT): {$(VPATH)}st.h
vm.$(OBJEXT): {$(VPATH)}subst.h
vm.$(OBJEXT): {$(VPATH)}symbol.h
vm.$(OBJEXT): {$(VPATH)}thread_$(THREAD_MODEL).h
vm.$(OBJEXT): {$(VPATH)}thread_native.h
vm.$(OBJEXT): {$(VPATH)}variable.h
Expand Down
1 change: 1 addition & 0 deletions vm.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include "internal/variable.h"
#include "iseq.h"
#include "rjit.h"
#include "symbol.h" // This includes a macro for a more performant rb_id2sym.
#include "yjit.h"
#include "ruby/st.h"
#include "ruby/vm.h"
Expand Down

0 comments on commit 6e4bb56

Please sign in to comment.