diff --git a/docs/Optimizations/For Loops.md b/docs/Optimizations/For Loops.md deleted file mode 100644 index 98afc510..00000000 --- a/docs/Optimizations/For Loops.md +++ /dev/null @@ -1,12 +0,0 @@ -The `pairs` and `ipairs` functions are optimized in Pluto. On a consistent basis, `pairs` & `ipairs` loops are **3.5x** faster than their Lua counterparts. - -## How does it work? -It doesn't operate under all circumstances though, the state of the iterator is stored in the to-be-closed variable returned by these functions, which is the last variable they give. If you interact or modify this variable, then the optimization won't occur. -``` -pairs: next, table, nil, nil -ipairs: ipairsaux, table, integer, nil -``` -As long as you don't access the last `nil` value, you're fine. -:::info -This optimization was published and implemented entirely by Xmelia Hermit. -::: diff --git a/docs/QoL Improvements/Generalized Iteration.md b/docs/QoL Improvements/Generalized Iteration.md index 375c5d92..0b87fbf0 100644 --- a/docs/QoL Improvements/Generalized Iteration.md +++ b/docs/QoL Improvements/Generalized Iteration.md @@ -12,7 +12,6 @@ for key, value in next(t) do print(key, value) end ``` -This is compatible with for-loop optimizations. :::caution The bytecode of this feature is not backwards-compatible with Lua.