Always inline revalidate_setivar_cache
revalidate_setivar_cache
vm_insnhelper.c: Unify populate_cache and fill_ivar_cache
populate_cache
fill_ivar_cache
They're the same code.
vm_insnhelper.c: refactor and optimize setivar cache revalidation
By only storing shape offsets in the cache, we're able to still match two equal objects that happen to be in different heaps, as well as to validate the object is neither frozen nor complex.
vm_insnhelper.c: share the cache revalidation logic
It's the same code duplicated in 3 places.
[ruby/prism] Optimize ripper visit_token
visit_token
It was showing up in profiles.
So:
KEYWORDS
BINARY_OPERATORS
start_with?
Overall gives a ~5% speed boost
https://github.com/ruby/prism/commit/d611aa9d11
[ruby/prism] Freeze the parse result for the ripper translator
It's a small, somewhat hacky performance boost. Locations are lazy, by freezing the result they don't have to be pack/unpacked redundantly. This gives about a 4% speed boost.
Other changes are to not modify the frozen AST...
[ruby/prism] Optimize ripper bounds
Basically a port of https://github.com/ruby/ruby/commit/c45f781771314a71856c9b348c640ba532f54349 into ruby
It's quite effective at ~97% hit rate for me. Speeds it up from ~6.77x slower to only 4.07x slower.
For the lexer on_sp it also gives a bit of an improvement:...
on_sp
Fix typo and improve docs of Exception#exception
[DOC] Add feature 21796 in NEWS.md
Fix coverage support for RubyVM::ISeq.compile
[Bug #22018]
ISeq returned by RubyVM::InstructionSequene.load_iseq weren't handled by the coverage module.
RubyVM::InstructionSequene.load_iseq
View all revisions | View revisions
Also available in: Atom