[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: LuaJIT with vectors
- From: Mike Pall <mikelu-1011@...>
- Date: Thu, 18 Nov 2010 13:09:17 +0100
Petri Häkkinen wrote:
> For example,
> normalize(mul(transformMat, vec1 + vec2))
> is very convenient syntax, and something I've been using with C++ and
> What do you think, is the LuaJIT compiler smart enough to eliminate these
Not yet. But adding escape analysis plus generalized store sinking
and allocation sinking is on my TODO list for a long time.
> But as a commercial game developer I would be very concerned about the
> alloc/gc overhead.
That's speculation and/or premature optimization. Of course such
overhead is easily demonstrable in isolated benchmarks. But I'd
need to see hard numbers from full-game profiling before I'd
consider this to be a serious issue.
> I'm talking about pushing
> LuaJIT to extremes here, so that only a minimal core would need to be
> implemented in C++.
Actually we're in violent agreement here. You just revealed my
plan for world domination. Dang!
> Yes, I agree. Bloating the size of all values is not a good solution. I was
> wondering would it be somehow magically possible to only make the vector
> type bigger without adding the overhead to all other types?
Sorry, I'm not a magician. I only play one on this list.