-
Notifications
You must be signed in to change notification settings - Fork 43
Optimize: VM implementation "switch case" to "delegate array" #46
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
Conversation
|
All changes are internal, so I think nothing is broken. |
nuskey8
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have made some comments about the implementation that I am concerned about. I would appreciate it if you could check them.
|
I think I've finished revising them according to your comment. |
|
I haven't looked into the implementation of LuaVirtualMachine in detail yet, so I'll merge it in as soon as I've checked it. |
|
I have checked the VM implementation. It looks very good. The only thing that bothers me is that SetOperations is separated into a separate Operators class. Is there a reason for this? Also, I would also be grateful if you could let me know if you have any references for this optimization. |
|
There is a conflict due to the merge of #47, could I resolve this on my end? |
|
Of course! |
Considering that LuaVirtualMachine is a static class, and that using lambda expressions reduces readability and the visibility of exceptions, I use nested class. |
No references available. I looked at the generated code and found that it was less efficient, so I adjusted it to generate the optimal code |
|
I've resolved the conflicts and formatted the code. If possible, could you please add comments to each step of the code? This will help me and other contributors understand the code properly. |
|
@annulusgames |
|
Are these comments sufficient? |
This PR is a large optimization.
NBodyBenchmark
.NET8 12ms -> 6.2ms
IL2CPP 81ms ->15ms