mirror of
https://github.com/luau-lang/luau.git
synced 2025-04-07 12:20:53 +01:00
Update docs/_pages/performance.md
Co-authored-by: Alan Jeffrey <403333+asajeffrey@users.noreply.github.com>
This commit is contained in:
parent
37a17cfb6a
commit
38d1365ea1
1 changed files with 1 additions and 1 deletions
|
@ -160,4 +160,4 @@ For example, functions like `insert`, `remove` and `move` from the `table` libra
|
|||
|
||||
Luau uses an incremental garbage collector which does a little bit of work every so often, and at no point does it stop the world to go through the entire heap. The runtime will make sure that the collector runs interspersed with the program execution as the program allocates additional memory, which is known as "garbage collection assists", and can also run in response to explicit garbage collection invocation. In interactive environments such as video game engines it's possible, and even desireable, to request garbage collection every frame to make sure assists are minimized, since that allows scheduling the garbage collection to run concurrently with other engine processing that doesn't involve script execution.
|
||||
|
||||
Inspired by excellent work by Austin Clements on Go's garbage collector pacer, we've implemented a pacing algorithm that uses a proportional–integral–derivative controller to estimate internal garbage collector tunables to reach a target heap size, defined as a percentage of the live heap data (which is more intuitive and actionable than Lua 5.x "GC pause" setting). Luau runtime also estimates the allocation rate making it easy to adjust the per-frame garbage collection requests to do most of the required GC work outside of script execution.
|
||||
Inspired by excellent work by Austin Clements on Go's garbage collector pacer, we've implemented a pacing algorithm that uses a proportional–integral–derivative controller to estimate internal garbage collector tunables to reach a target heap size, defined as a percentage of the live heap data (which is more intuitive and actionable than Lua 5.x "GC pause" setting). Luau runtime also estimates the allocation rate making it easy (when allocation rates do not vary much) to adjust the per-frame garbage collection requests to do most of the required GC work outside of script execution.
|
||||
|
|
Loading…
Add table
Reference in a new issue