Re: Huge performance loss when processing lots of data

  • From: Mike Pall <mike-1207@xxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Tue, 3 Jul 2012 20:45:06 +0200

Chris wrote:
> Yes, thanks I know about that.  It *is* what I want though (ie. part
> of the "weirdness").

Well, what's the point in creating different struct types with
identical contents? Because you want different metatypes, but why?

Types are not the proper mechanism for this. Dispatch from a
single set of metamethods instead.

And you realize that "return d[i]" refers to the upvalue 'd' and
not to o.d? I don't think that's what you want.

> However, is that what is causing the problem?  Too many types?

Every different type spawns a new trace that's attached to the
previous trace. There's a limit to this and after that you end up
in the interpreter.


Other related posts: