Update docs/_posts/2022-06-01-luau-recap-may-2022.md

Co-authored-by: dcope-rbx <91100513+dcope-rbx@users.noreply.github.com>
This commit is contained in:
vegorov-rbx 2022-06-01 09:52:21 -07:00 committed by GitHub
parent 2c63c56012
commit 3e552aef8f
Signed by: DevComp
GPG key ID: 4AEE18F83AFDEB23

View file

@ -90,7 +90,7 @@ Returning a type-cast local (`return a :: type`) as well as returning multiple l
### Function inlining and loop unrolling
In open-source release of Luau, when optimization level 2 is enabled, compiler will now perform function inlining and loop unrolling.
In the open-source release of Luau, when optimization level 2 is enabled, the compiler will now perform function inlining and loop unrolling.
Only loops with loop bounds known at compile time, such as `for i=1,4 do`, can be unrolled. The loop body must be simple enough for the optimization to be profitable; compiler uses heuristics to estimate the performance benefit and automatically decide if unrolling should be performed.