[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: LuaJIT2 performance for number crunching
- From: Tony Finch <dot@...>
- Date: Wed, 16 Feb 2011 17:51:52 +0000
On Wed, 16 Feb 2011, Mike Pall wrote:
>
> [...]
> local a21 = 1/5
> [...]
> local function ode_dormandprince ( fxy , x0 , x1 , y0 , tol , hmax , hmin , maxiter )
> [...]
> while true do
> local K2 = fxy ( x + c2*h, y + h*( a21*K1 ) )
> [...]
>
> Rule #437: Never hoist out constants (if possible)!
When steve donovan proposed a "const" keyword earlier today, I wondered if
LuaJIT was able to spot that a local is only assigned to once so it could
automatically treat it as const.
Tony.
--
f.anthony.n.finch <dot@dotat.at> http://dotat.at/
Forth, Tyne, Dogger: Mainly south or southeast, 5. Moderate or rough. Showers.
Moderate or good.
- References:
- Re: LuaJIT2 performance for number crunching, Florian Weimer
- Re: LuaJIT2 performance for number crunching, Francesco Abbate
- Re: LuaJIT2 performance for number crunching, Leo Razoumov
- Re: LuaJIT2 performance for number crunching, Francesco Abbate
- Re: LuaJIT2 performance for number crunching, Leo Razoumov
- Re: LuaJIT2 performance for number crunching, Francesco Abbate
- Re: LuaJIT2 performance for number crunching, Leo Razoumov
- Re: LuaJIT2 performance for number crunching, Francesco Abbate
- Re: LuaJIT2 performance for number crunching, T T
- Re: LuaJIT2 performance for number crunching, Daurnimator
- Re: LuaJIT2 performance for number crunching, Mike Pall