[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lua-l
Subject:    Re: (no subject)
From:       Coda Highland <chighland () gmail ! com>
Date:       2013-01-22 23:30:06
Message-ID: CAFE_sBH0w6UcPRTCOgkmcqW_n2=UhUNrFcMQz2adTcz4WTsV3w () mail ! gmail ! com
[Download RAW message or body]

On Tue, Jan 22, 2013 at 3:22 PM, Emeka <emekamicro@gmail.com> wrote:
> Hello Sir,
>
> table.concat()  is also based on the same algorithm.
>
> Regards, \Emeka
> On Wed, Jan 23, 2013 at 12:14 AM, Coda Highland <chighland@gmail.com> wrote:
>>
>> table.concat()

Other way around: that algorithm is based on table.concat().

My statement stands: table.concat() is the fastest way to do it.
There's no other way to do it without exposing yourself to quadratic
behavior.

(Okay, so you could do some sort of a tree-based concatenation to get
O(n log n), but at that point you're constructing the list anyway and
you might as well use table.concat().)

/s/ Adam

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic