removed conf link

Signed-off-by: Dibri Nsofor <dnsofor@roblox.com>
This commit is contained in:
Dibri Nsofor 2024-07-11 10:19:57 -07:00
parent 5022cf2fd8
commit 9586170ab9

View file

@ -11,12 +11,13 @@ Luau's bytecode compiler (or VM?) is smart about inlining functions. We would ra
Whether the goal is to improve instruction locality or perform context specific optimizations, <!-- force the compiler to optimize the function body in specific contexts --> function inlining can be a great resource for developers. Thankfully with the `-02` switch, Luau is able to automatically decide if code deserves to be inlined and optimize the code accordingly. To the best of our knowledge, exposing this to users directly could do more harm than good. Not only do these use cases only cater to a tiny subset of the language's users, it exposes our bytecode compiler to FILL when the larger subset who may not have a working understanding of the compiler adopts it. Whether the goal is to improve instruction locality or perform context specific optimizations, <!-- force the compiler to optimize the function body in specific contexts --> function inlining can be a great resource for developers. Thankfully with the `-02` switch, Luau is able to automatically decide if code deserves to be inlined and optimize the code accordingly. To the best of our knowledge, exposing this to users directly could do more harm than good. Not only do these use cases only cater to a tiny subset of the language's users, it exposes our bytecode compiler to FILL when the larger subset who may not have a working understanding of the compiler adopts it.
```luau ```luau
@inline -- does not exist @inline
local function sum(lst: {[number]}) local function sum(lst: {[number]})
if #lst == 0 then if #lst == 0 then
return 0 return 0
else else
return lst[1] + sum(lst) -- bad rec return lst[1] + sum(lst) -- bad rec
end
end end
local s = sum({1, 2, 3}) local s = sum({1, 2, 3})
@ -35,6 +36,5 @@ None (yet).
None (yet). None (yet).
## Alternatives ## Alternatives
<!-- copied from: https://roblox.atlassian.net/wiki/spaces/Client/pages/1542170530/VM+Roadmap+2021#VMRoadmap2021-Debugger -->
Prior to now, the team has considered some designs to make function inlining work effectively in Luau and is still hopeful that this may be possible sometime in the future. Till then, we suggest opening github issues with code samples of legitimate cases that we can use to further improve Luau's automatic (function inlining and unrolling) optimizations. Prior to now, the team has considered some designs to make function inlining work effectively in Luau and is still hopeful that this may be possible sometime in the future. Till then, we suggest opening github issues with code samples of legitimate cases that we can use to further improve Luau's automatic (function inlining and unrolling) optimizations.