summaryrefslogtreecommitdiff
path: root/ext/-test-/memory_view/memory_view.c
diff options
context:
space:
mode:
authoreileencodes <eileencodes@gmail.com>2020-09-24 14:00:51 -0400
committerAaron Patterson <aaron.patterson@gmail.com>2020-10-01 10:11:02 -0700
commit8dd9a2369331f594de8b8541faf90c461813eb77 (patch)
treed299dd21a844d252c6702abd34dccee235ee55cf /ext/-test-/memory_view/memory_view.c
parentd9599878914404f7d18875d38ce928d488bcdc79 (diff)
Make minor improvements to super
The changes here include: * Using `FL_TEST_RAW` instead of `FL_TEST` in the first check in `vm_search_super_method`. While the profile showed us spending a fair amount of time here, the subsequent benchmarks didn't show much improvement when adding this. Regardless, we know this does less work than `FL_TEST` and we know that `FL_TEST_RAW` is safe due to the previous check so it's a small but accurate optimization. * Set `mid` only once. Both `vm_ci_new_runtime` and `vm_ci_mid` were getting the `original_id` for the method entry. We can do this once and pass the variable to the 2 callers that need it. This also doesn't have a huge performance improvement but cleans up the code a bit. Benchmark: ``` | |compare-ruby|built-ruby| |:----------------|-----------:|---------:| |vm_iclass_super | 3.540M| 3.940M| | | -| 1.11x| ``` Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org>
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3614
Diffstat (limited to 'ext/-test-/memory_view/memory_view.c')
0 files changed, 0 insertions, 0 deletions