[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Sjlj vs dwarf2 on mingw for octave
From: |
Tatsuro MATSUOKA |
Subject: |
Sjlj vs dwarf2 on mingw for octave |
Date: |
Mon, 30 Mar 2009 13:40:22 +0900 (JST) |
Hello
According to README-gcc-tdm.txt in MiGW GCC by TDM, there exists the following
description,
***********
Until recently, only SJLJ has been available for the Windows
platform. This affects you, the end user, primarily in programs that throw and
catch exceptions. Programs which utilize the DW2 unwind method handle exceptions
much more quickly than programs which utilize the SJLJ method. However, the DW2
method increases code size by a noticeable amount, and additionally cannot yet
unwind (pass exceptions) through "foreign" stack frames: stack frames compiled
by another non-DW2-enabled compiler, such as OS DLLs in a Windows callback.
***********
I have tested this the following the code,
#script testOregoB.m
function dx = oregonator_m (x, t)
dx = zeros (3, 1);
dx(1) = 77.27*(x(2) - x(1)*x(2) + x(1) - 8.375e-06*x(1)^2);
dx(2) = (x(3) - x(1)*x(2) - x(2)) / 77.27;
dx(3) = 0.161*(x(1) - x(3));
end
% The test of `oregonator'.
x0 = [ 4; 1.1; 4 ];
%t = [0, logspace (-1, log10(303), 150), logspace (log10(304), log10(500),
150)];
%t=linspace(0,500,1000);
t=0:0.5:500;
ts=cputime();
y = lsode ('oregonator_m', x0, t);
cputime()-ts
plot (t',y(:,1),"",t',y(:,2),"",t',y(:,3));
#*******end of script
Sjlj octave-3.0.4RC7
octave.exe:2> testOregoB
ans = 1.5469
Dwarfs octave-3.0.4RC5
octave:3> testOregoB
ans = 1.1875
Optimizing option
export FFLAGS='-O3 -fomit-frame-pointer'
export CFLAGS='-O3 -fomit-frame-pointer'
export CXXFLAGS='-O3 -fomit-frame-pointer'
For Benjamin Binary of octave-3.0.2
> testOregoB
ans = 1.2344
That is near to 3.0.4RC5 with dwarf2 because Benjamin's binaries are built by
GCC-4.3.0-TDM-dw2.
The speed of binaries built with dw2 is 25 to 30 % faster than that of sjlj.
This is a just record so that I would not like to say dw2 EH is better than
sjlj EH.
Regards
Tatsuro
--------------------------------------
Power up the Internet with Yahoo! Toolbar.
http://pr.mail.yahoo.co.jp/toolbar/