lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 12/6/2010 9:58 AM, Tomas Lundell wrote:
I can confirm that clock-for-clock Lua runs slower on the Xbox360
and PS3. It's not as easy as you might think to get a realistic
sample of Lua-only execution as we go in and out of C a bit.
However my impression is that overall a factor of 2-4 may be fair.
The costs I am seeing are due to L2 cache misses (from much
smaller caches), branch misprediction and (to a lesser degree)
load-hit-stores.

I have tried redoing the table implementation according to the
Microsoft slides with rather meager gains (but with some nice
memory savings). I haven't tried the other suggestions.

Thanks for chipping in. I guess it's comparable to running on an Intel Atom - roughly a 2-issue in-order core. No biggie -- we already heard Mike Pall did wonders for a PowerPC client :-)

To be fair, the original slide was a valid general observation, but easily misinterpreted when quickly looking over. I think five years ago the performance of the "naive port" would have been great with nary a negative peep. Methinks they should have just called it a "straight port". Today, the disparity sticks out... so top gun devs will of course change their tune and call things "naive". It's showbusiness I guess.

--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia