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

Replace 'new Instruction' with constants for cases where inputs will always be the same to reduce memory alloc #6

Closed
Col-E opened this issue Apr 22, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@Col-E
Copy link
Owner

Col-E commented Apr 22, 2023

Things like CfThrow and CfReturn have no parameters. Having multiple instances in memory is a waste.

@Col-E Col-E added the enhancement New feature or request label Apr 22, 2023
xxDark added a commit that referenced this issue Apr 22, 2023
@xxDark
Copy link
Collaborator

xxDark commented Apr 22, 2023

Partially done, we might want to also cache common scenarios for register loads and stores. E.g. ALOAD 0, XLOAD 0-5 probably appear often in the resulting bytecode. Same for any stack operation (POP, POP2, SWAP, etc).

@Col-E
Copy link
Owner Author

Col-E commented Apr 23, 2023

Basically all the CF instructions that can be reasonably cached are now cached.

None of the DEX instructions can be cached due to their linked int offset value that is used frequently. Calling this done.

@Col-E Col-E closed this as completed Apr 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants