Re: time to create / memory footprint of VM

  • From: Tim Caswell <tim@xxxxxxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Mon, 16 Jul 2012 09:03:36 -0500

On Mon, Jul 16, 2012 at 4:11 AM, Craig Barnes <craigbarnes85@xxxxxxxxx> wrote:
> On 16 July 2012 02:05, Tim Caswell <tim@xxxxxxxxxxxxxx> wrote:
>> Mike, I didn't realize that coroutines were that cheap!  How to they
>> compare to just using callbacks for everything like we do in
>> nodejs/luvit?
>>
>
> Well too many closures causes "trace explosion" and too much reactor
> pattern causes brain damage (as observed in the Node.js community).
> Those are the useful metrics.

Actually I moved to nodeJS from my previous occupation (PHP4 + IE6
webapps) to prevent brain damage (I even have the results of the MRI
scan from the brain specialist)

Yes reactor pattern can be hard, but the JS community is most used to
it since all I/O in the browser is async and callback based.  Many
successful startups are based on nodejs and love the style.  It's not
for everyone, but it certainly has a place in the world.  When is the
last time that a lua conference sold out moments after tickets went on
sale?

That said, one of my main motivations for my node in luajit experiment
was to see how co-routines would affect this aesthetic.  (The other
reason being that luajit is just plain awesome!)  I was convinced by
my peers that coroutines are simply too expensive, but after hearing
they are only 400 bytes I'm starting to reconsider.

>

Other related posts: