aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMike Pall <mike>2013-10-09 17:01:22 +0200
committerMike Pall <mike>2013-10-09 17:02:01 +0200
commitc8cfca05578932567d2c65d59262f398e8acaed2 (patch)
tree5699e7f2df3a5166eee667b0971775cea6c0ab4b /doc
parent47df3ae5136521da96767e6daed4cdd241de2fa6 (diff)
downloadluajit-c8cfca05578932567d2c65d59262f398e8acaed2.tar.gz
luajit-c8cfca05578932567d2c65d59262f398e8acaed2.tar.bz2
luajit-c8cfca05578932567d2c65d59262f398e8acaed2.zip
Add table.new().
Diffstat (limited to 'doc')
-rw-r--r--doc/extensions.html9
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 &rarr; 2.1) or between any beta release. Foreign
208bytecode (e.g. from Lua 5.1) is incompatible and cannot be loaded. 208bytecode (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>
213An 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
215the C API equivalent <tt>lua_createtable()</tt>. This is useful for big
216tables if the final table size is known and automatic table resizing is
217too 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>
213LuaJIT uses a Tausworthe PRNG with period 2^223 to implement 222LuaJIT uses a Tausworthe PRNG with period 2^223 to implement