[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: How to clone a table in LJ2-friendly way?
- From: Mike Pall <mikelu-1108@...>
- Date: Wed, 31 Aug 2011 11:41:36 +0200
Alexander Gladysh wrote:
> On Sat, Aug 27, 2011 at 11:29, Alexander Gladysh <agladysh@gmail.com> wrote:
> > 1. I'm content with the fact that the pairs() would always be slow.
> >
> > 2. However, if pairs() abort the trace of any function...
> >
> > 3. ...Then that *any* function may never be compiled to the native code.
> >
> > 4. And that function may do something complex and optimizable besides
> > calling pairs()...
> >
> > 5. ...Which would never be optimized due to #3.
> >
> > So, should I, for example, move the body of a loop with pairs() to the
> > separate function so it would be compiled? Or what?
>
> Mike, I'm very sorry to waste your time on dumb questions, but could
> you please shed some light here? ("No" or "Yes" would suffice if
> you're too busy to give a detailed answer.)
1. Happily ignoring my advice.
2. Yes.
3. Not if the function itself doesn't contain the call to next().
4. See 1.
5. No.
6. Why don't you try? -jv tells you what happens.
--Mike
- References:
- Re: How to clone a table in LJ2-friendly way?, Dimiter "malkia" Stanev
- Re: How to clone a table in LJ2-friendly way?, Alexander Gladysh
- Re: How to clone a table in LJ2-friendly way?, Dimiter "malkia" Stanev
- Re: How to clone a table in LJ2-friendly way?, Alexander Gladysh
- Re: How to clone a table in LJ2-friendly way?, Alexander Gladysh
- Re: How to clone a table in LJ2-friendly way?, Mike Pall
- Re: How to clone a table in LJ2-friendly way?, Alexander Gladysh
- Re: How to clone a table in LJ2-friendly way?, Dirk Laurie
- Re: How to clone a table in LJ2-friendly way?, Alexander Gladysh
- Re: How to clone a table in LJ2-friendly way?, Alexander Gladysh