[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Issues with the current varargs implementation (Was: Re: inadequate documentation for select and table.unpack)
- From: Martin <eden_martin_fuhrspam@...>
- Date: Thu, 23 Jun 2016 15:10:21 -0700
On 16-06-23 04:48 AM, Viacheslav Usov wrote:
> 1. (More important) The reference manual should point out that {...} is
> the best way, overall, to deal with variadic arguments, and select is
> deprecated.
You ignore memory allocation. As I understand, select(i, ...) requires
constant amount of memory while "{...}" allocates table and consumes
memory proportional to length of "...".
For example in World of Warcraft lua API there are many sick functions
which returns dozens of results. Instead of single table with results.
Maybe just because it's faster in C and does not create table which will
occupy memory till next garbage collection.
Also if your addon needs just couple of these results you'd better to
use select(). Again, to avoid creating temporary table which will occupy
memory.
- References:
- inadequate documentation for select and table.unpack, Viacheslav Usov
- Re: inadequate documentation for select and table.unpack, Roberto Ierusalimschy
- Re: inadequate documentation for select and table.unpack, Viacheslav Usov
- Issues with the current varargs implementation (Was: Re: inadequate documentation for select and table.unpack), Soni L.
- Re: Issues with the current varargs implementation (Was: Re: inadequate documentation for select and table.unpack), Patrick Donnelly
- Re: Issues with the current varargs implementation (Was: Re: inadequate documentation for select and table.unpack), Philipp Janda
- Re: Issues with the current varargs implementation (Was: Re: inadequate documentation for select and table.unpack), steve donovan
- Re: Issues with the current varargs implementation (Was: Re: inadequate documentation for select and table.unpack), Dirk Laurie
- Re: Issues with the current varargs implementation (Was: Re: inadequate documentation for select and table.unpack), KHMan
- Re: Issues with the current varargs implementation (Was: Re: inadequate documentation for select and table.unpack), Dirk Laurie
- Re: Issues with the current varargs implementation (Was: Re: inadequate documentation for select and table.unpack), KHMan
- Re: Issues with the current varargs implementation (Was: Re: inadequate documentation for select and table.unpack), Viacheslav Usov
- Re: Issues with the current varargs implementation (Was: Re: inadequate documentation for select and table.unpack), Dirk Laurie
- Re: Issues with the current varargs implementation (Was: Re: inadequate documentation for select and table.unpack), Viacheslav Usov
- Re: Issues with the current varargs implementation (Was: Re: inadequate documentation for select and table.unpack), Philipp Janda
- Re: Issues with the current varargs implementation (Was: Re: inadequate documentation for select and table.unpack), Viacheslav Usov
- Re: Issues with the current varargs implementation (Was: Re: inadequate documentation for select and table.unpack), Viacheslav Usov