Skip to content

Miscellaneous small optimizations#6380

Merged
headius merged 6 commits intojruby:masterfrom
headius:misc_optz
Sep 1, 2020
Merged

Miscellaneous small optimizations#6380
headius merged 6 commits intojruby:masterfrom
headius:misc_optz

Conversation

@headius
Copy link
Member

@headius headius commented Aug 31, 2020

See commits for details.

* Capture field in locals whenever possible to avoid repeated
  reads and concurrent modifications.
* Override makeShared to return specialized instances, avoiding
  boxing of values into an array.
* Add specialized logic for collect to return specialized
  instances.
* Simplify class-based isBuiltin by allowing that case in
  CachingCallSite.
* Avoid re-reading some fields.
* Make hash final in entry so it can be optimized by "truly final"
  JITs. When rehashing, if hash changes (very rare) new entries
  will be created.
This avoids it logging indirect binding over and over again.
@headius headius added this to the JRuby 9.3.0.0 milestone Aug 31, 2020
Size needs to be reflected during iteration. Also perform this
check during two-elt array collect and add test for that case.
@headius headius merged commit a06074c into jruby:master Sep 1, 2020
@headius headius deleted the misc_optz branch September 1, 2020 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant