Now for some benchmarks on Matlab 7.1 release 14 and Freemat 4.0
The short story is that these run 4 times faster in Matlab. The good
news is that good optimization helps in both a lot. Zipfile
forthcoming. Results are in the text file freematBenchtest.txt. The
three test files are:
1) function res = vecTest(N,M)
% how to say matrix multiply in matlab
2) function r = funcTest(N)
% different ways of calling a function
% in this case, y = x.^2;
% with x = linspace(-100,100,N);
3) function res = jitTest(N)
% Tests of JIT compliant variants on a for loop
Also two other items:
==================
Strvcat: not my own, seen somewhere and forgotten source.
function out = strvcat(varargin)
%function out = strvcat(varargin)
out = char(varargin{:});
===================
a scott gorlin example of anon function of functions:
% Anon function of functions use
[x y] = meshgrid(linspace(0,1));
dist = 2*pi*sqrt(x.^2 + y.^2);
display = @(wave,freq) imagesc(wave(freq*dist));
figure
display(@sin,2);
figure
display(@cos,2);
works in matlab but not freemat. Thoughts?
--
You received this message because you are subscribed to the Google Groups "freemat-devel" group.
To post to this group, send email to freema...@googlegroups.com.
To unsubscribe from this group, send email to freemat-deve...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/freemat-devel?hl=en.
FreeMat 4.0 windows 32 binary - I didn't build from source, your
mileage may vary.
All code is in the files section of this group, see
freematbenchtest.zip
Here is the top of the freematbenchtest.txt file:
System: XP Pro 5.1 SP3 Dell Dimension 9100 Pentium D 2.80 GHz 2 GB
Applications set to realtime priority
FreeMat 4.0 windows 32
Matlab 7.1 Release 14
I think results are mostly as expected - FreeMat jit is still
experimental. We are planning to do many more improvements in the near
future.
One thing. Did you average your benchmark over several runs? The first
time you run a piece of code in FreeMat, jit compiles the code (if it
can), so you get an artifically slow result. The second time and up
you run the code, FreeMat uses "cached" compiled code (until you
change the script). So, you may want to throw away the first benchmark
run.
Cheers,
Eugene
The benchmarks are designed to try a host of ways to do the same thing
so they may shed light on where problems lurk.
What impresses me is that it has really small footprint. Personally
3-5 times slower on most things is pretty cool.
Perhaps someone could try out the benchmarks on a Linux machine and
get back.