[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: LuaJIT2 performance for number crunching
- From: T T <t34www@...>
- Date: Thu, 17 Feb 2011 16:26:45 +0000
On 17 February 2011 15:50, Leo Razoumov <slonik.az@gmail.com> wrote:
>
> As far as the MATLAB interpreter/JIT is concerned it is hopelessly
> slow so that using MATLAB in event-driven simulations that require
> explicit loops and lots of branching is PITA.
MATLAB's jit has its limitations (e.g., I don't think it can jit
through functions calls) but I could get quite a good speed up from it
with carefully written code. For trivial code:
n = 5e4;
a = 0;
tic
for i = 1:n,
for j = 1:n,
a = a + 1;
end
end
toc
I get 9.30sec on my machine. An equivalent Lua code takes 2.55sec.
So MATLAB is clearly not as good as luajit, but not as terrible as
some would like to make it.
> IMHO, the best thing that could happen to MATLAB is to switch to Lua,
> license Mike's LuaJIT and port their cool toolboxes to it.
Dream on. That will never happen. But one could write a bridge to
MATLAB, something like lupa for python. With access to native data
types in MATLAB through FFI, that could be quite fast.
Cheers,
Tomek
- 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
- Re: LuaJIT2 performance for number crunching, Philippe Lhoste
- Re: LuaJIT2 performance for number crunching, Alexander Gladysh
- Re: LuaJIT2 performance for number crunching, Miles Bader
- Re: LuaJIT2 performance for number crunching, T T
- Re: LuaJIT2 performance for number crunching, steve donovan
- Re: LuaJIT2 performance for number crunching, T T
- Re: LuaJIT2 performance for number crunching, Leo Razoumov