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

Reduce allocations per LuaClosure call #76

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Commits on Sep 1, 2020

  1. Update LuaClosure.java

    Re-use stack frames in LuaClosure if possible to reduce number of allocations per function call
    LobbyDivinus committed Sep 1, 2020
    Configuration menu
    Copy the full SHA
    7ed120b View commit details
    Browse the repository at this point in the history
  2. Revert "Update LuaClosure.java"

    This reverts commit 7ed120b.
    LobbyDivinus committed Sep 1, 2020
    Configuration menu
    Copy the full SHA
    1084047 View commit details
    Browse the repository at this point in the history
  3. Reduce allocations per LuaClosure call

    Every call of a LuaClosure issues creation of a new stack frame for the function execution. Since this stack is usually thrown away after execution pooling them can help to reduce garbage collection overhead (there's one exception to this: the stack can be used as part of the returned varargs object, in that case it cannot be reused since that could cause conflicts). In my use case this change was a useful for calling a lot of Lua functions on a mobile device.
    LobbyDivinus committed Sep 1, 2020
    Configuration menu
    Copy the full SHA
    12a449a View commit details
    Browse the repository at this point in the history