lua-users home
lua-l archive

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


> >You'd be amazed at what CPU budgets are on some projects - my entire
> >work has to fit within 0.5% CPU, and that's an important part of the
> >game... So any optimizations that can be made, are made, and they can
> >only be made if we know about the impact.
>
> Yeah but if that flag causes a performance hit outside your code, surely
> that will decrease your percentage of frame time?

My whole point to begin with.  While this flag is effective, the real
question is "Is it the best way?"

Personally, I can't throw the performance question to the wind without at
least a little research.  Perhaps going float instead of double as the Lua
number is a faster way.  Maybe it's careful manual manipulation of the FPU
state.  It could be something else that smarter minds than mine will come up
with.  Or maybe it's as fast as anything else you could do.  The only way to
really be sure is to try all approaches and benchmark, benchmark, benchmark.

I'm not really skilled enough to attempt more than a few approaches - those
listed - and I'm not really sure I'm up to the task of creating effective
benchmarks.  Basically, I (and others, apparently) am simply curious to know
if anyone has checked to see exactly what impact this flag creates vs.
changing the Lua number to float, etc.  From what I've heard everyone has
simply adopted the flag, and damn the cost.

Richard