diff options
author | Mike Pall <mike> | 2013-10-09 17:01:22 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2013-10-09 17:02:01 +0200 |
commit | c8cfca05578932567d2c65d59262f398e8acaed2 (patch) | |
tree | 5699e7f2df3a5166eee667b0971775cea6c0ab4b /doc | |
parent | 47df3ae5136521da96767e6daed4cdd241de2fa6 (diff) | |
download | luajit-c8cfca05578932567d2c65d59262f398e8acaed2.tar.gz luajit-c8cfca05578932567d2c65d59262f398e8acaed2.tar.bz2 luajit-c8cfca05578932567d2c65d59262f398e8acaed2.zip |
Add table.new().
Diffstat (limited to 'doc')
-rw-r--r-- | doc/extensions.html | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/extensions.html b/doc/extensions.html index 33bcfb28..48f4220c 100644 --- a/doc/extensions.html +++ b/doc/extensions.html | |||
@@ -208,6 +208,15 @@ minor releases (2.0 → 2.1) or between any beta release. Foreign | |||
208 | bytecode (e.g. from Lua 5.1) is incompatible and cannot be loaded. | 208 | bytecode (e.g. from Lua 5.1) is incompatible and cannot be loaded. |
209 | </p> | 209 | </p> |
210 | 210 | ||
211 | <h3 id="table_new"><tt>table.new(narray, nhash)</tt> allocates a pre-sized table</h3> | ||
212 | <p> | ||
213 | An extra library function <tt>table.new()</tt> can be made available via | ||
214 | <tt>require("table.new")</tt>. This creates a pre-sized table, just like | ||
215 | the C API equivalent <tt>lua_createtable()</tt>. This is useful for big | ||
216 | tables if the final table size is known and automatic table resizing is | ||
217 | too expensive. | ||
218 | </p> | ||
219 | |||
211 | <h3 id="math_random">Enhanced PRNG for <tt>math.random()</tt></h3> | 220 | <h3 id="math_random">Enhanced PRNG for <tt>math.random()</tt></h3> |
212 | <p> | 221 | <p> |
213 | LuaJIT uses a Tausworthe PRNG with period 2^223 to implement | 222 | LuaJIT uses a Tausworthe PRNG with period 2^223 to implement |