Project

General

Profile

« Previous | Next » 

Revision 6ff12507

Added by shyouhei (Shyouhei Urabe) about 6 years ago

rb_method_basic_definition_p with CC

Noticed that rb_method_basic_definition_p is frequently called.
Its callers include vm_caller_setup_args_block(),
rb_hash_default_value(), rb_num_neative_int_p(), and a lot more.

It seems worth caching the method resolution part. Majority of
rb_method_basic_definion_p() usages take fixed class and fixed
method id combinations.

Calculating -------------------------------------
ours trunk
so_matrix 2.379 2.115 i/s - 1.000 times in 0.420409s 0.472879s

Comparison:
so_matrix
ours: 2.4 i/s
trunk: 2.1 i/s - 1.12x slower