Skip to content

Commit d7929e8

Browse files
committed
table.create
1 parent 5758e11 commit d7929e8

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/Runtime Environment/Table.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,3 +396,13 @@ print(test[1]) --> 1
396396
print(test[2]) --> 5
397397
print(test[3]) --> 6
398398
```
399+
400+
---
401+
### `table.create`
402+
Creates a new empty table, preallocating memory. Improves performance and memory usage when you know how many elements the table will have.
403+
#### Parameters
404+
1. How many elements the table will have as a sequence.
405+
2. How many other elements the table will have. Defaults to 0.
406+
:::info
407+
We are documenting this for the sake of completeness of in regards to "changes from Lua 5.4", but this function is actually backported from Lua 5.5.
408+
:::

0 commit comments

Comments
 (0)