Skip to content

Inline ThrowInvalidOperationWithName in LuaVirtualMachine.SetTableValueSlowPath#319

Open
julcreutz wants to merge 1 commit into
nuskey8:mainfrom
julcreutz:feature/fix-set-table-value-alloc
Open

Inline ThrowInvalidOperationWithName in LuaVirtualMachine.SetTableValueSlowPath#319
julcreutz wants to merge 1 commit into
nuskey8:mainfrom
julcreutz:feature/fix-set-table-value-alloc

Conversation

@julcreutz

Copy link
Copy Markdown

LuaVirtualMachine.SetTableValueSlowPath allocates 24 bytes regardless if ThrowInvalidOperationWithName was called or not.

This PR inlines the local method to prevent these allocations.

I heavily rely on this in my game loop, so these benign allocations add up fast.

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