Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mono interpreter performance optimizations #47520

Open
14 of 24 tasks
BrzVlad opened this issue Jan 27, 2021 · 1 comment
Open
14 of 24 tasks

Mono interpreter performance optimizations #47520

BrzVlad opened this issue Jan 27, 2021 · 1 comment
Assignees
Labels
area-Codegen-Interpreter-mono tracking This issue is tracking the completion of other related issues.
Milestone

Comments

@BrzVlad
Copy link
Member

BrzVlad commented Jan 27, 2021

Following #43681 and #46037, the interpreter allows for additional improvements. This issue tracks additional improvements that we plan to do, loosely ordered by their priority. This list will be updated with additional improvements that are deemed useful.

Optimizations Done

Planned optimizations

  • Loop unrolling
  • Struct field promotion
  • Constant propagation of string literals
  • Move constant declaration from common paths to their use location
  • Improve inlining heuristic
  • Additional hardware / numerics intrinsics
  • Optimize out unnecessary MINT_CKNULL, by tracking nullability of some vars
  • Optimize out empty finally blocks
  • Loop-invariant hoisting
  • Better track type of vars and remove redundant CONV opcodes
@ghost
Copy link

ghost commented Jan 27, 2021

Tagging subscribers to this area: @BrzVlad
See info in area-owners.md if you want to be subscribed.

Issue Details

Following #43681 and #46037, the interpreter allows for additional improvements. This issue tracks additional improvements that we plan to do, loosely ordered by their priority. This list will be updated with additional improvements that are deemed useful.

Planned optimizations

  • Add our own var offset allocator, moving away from the current one based on IL stack. This improves the flexibility of future optimizations.
  • Optimize MINT_NEWOBJ opcodes. Remove memcpy of args, allow for optimizing them out.
  • Add superinstructions for binop + imm, also for ret + imm
  • Remove MINT_CHECKPOINT generation. Either include the checkpoint into all branching opcodes, or add a few superinstructions for the most common branching opcodes.
  • Optimize out unnecessary MINT_CKNULL, by tracking nullability of some vars
  • Optimize out empty finally blocks
  • Enable inlining of methods that throw exceptions
  • Track the value of global vars over multiple basic blocks
  • Remove uses of MINT_INITLOCALS, since almost every local is initialized explicitly by code.
Author: BrzVlad
Assignees: BrzVlad
Labels:

area-Codegen-Interpreter-mono

Milestone: -

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged New issue has not been triaged by the area owner label Jan 27, 2021
@SamMonoRT SamMonoRT removed the untriaged New issue has not been triaged by the area owner label Jan 27, 2021
@SamMonoRT SamMonoRT added this to the 6.0.0 milestone Jan 27, 2021
@marek-safar marek-safar added the tracking This issue is tracking the completion of other related issues. label Jan 27, 2021
@BrzVlad BrzVlad modified the milestones: 6.0.0, Future Jun 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Codegen-Interpreter-mono tracking This issue is tracking the completion of other related issues.
Projects
None yet
Development

No branches or pull requests

3 participants