[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Please build the JIT branch
From: |
Michael Goffioul |
Subject: |
Re: Please build the JIT branch |
Date: |
Fri, 13 Jul 2012 09:12:55 +0100 |
Results on Atom N270 500MB RAM, compiled with VS2010 (with debug enabled):
n = 1e6
K = 500
with JIT:
vectorized = 24.31s
loopy = 0.203s (impressive, compared to the result without JIT...)
without JIT:
vectorized = 23.8s
loopy = 130s
I also tried the complex test:
a = b = 1+1i;
for ii=1:5
a = a + b;
endfor
unfortunately it generates a segmentation fault (works fine without JIT). If the goal is to enforce calling convention, then I suggest you use the appropriate modifiers instead of extern "C". If you want I can give it a quick try here.
To compile successfully with MSVC, I had to apply the attached patch. The reason is to avoid duplicate symbols with liboctave when linking liboctinterp. MSVC is a bit pesky when it comes to instantiating template classes containing non-inlined methods and exporting the symbols in a DLL. In this specific case, problems occurred when compiling Array-jit.cc; I had to:
1) avoid a dll-exportable Array<octave_value> to be included, like in Cell.h, otherwise MSVC will try to instantiate *all* Array methods, including those in Array.cc, but those cannot be instantiated properly with octave_value as template parameter
2) mark Array<int> as dll-imported, to avoid MSVC to re-instantiate the methods in Array.cc for T=int; if it does, these symbols will clash with those exported from liboctave
I think the patch is harmless and non-intrusive for other compilers, so I think it could be applied directly in your branch.
Michael.
jit_msvc
Description: Binary data
- Re: Please build the JIT branch, (continued)
- Re: Please build the JIT branch, fotios, 2012/07/12
- Re: Please build the JIT branch, Doug Stewart, 2012/07/12
- Re: Please build the JIT branch, Max Brister, 2012/07/12
- Re: Please build the JIT branch, fotios, 2012/07/12
- Re: Please build the JIT branch, Doug Stewart, 2012/07/12
- Re: Please build the JIT branch, Doug Stewart, 2012/07/12
- Re: Please build the JIT branch, Max Brister, 2012/07/12
- Re: Please build the JIT branch, Max Brister, 2012/07/12
- Re: Please build the JIT branch, Doug Stewart, 2012/07/12
- Re: Please build the JIT branch, Doug Stewart, 2012/07/12
- Re: Please build the JIT branch,
Michael Goffioul <=
- Re: Please build the JIT branch, Michael Goffioul, 2012/07/13
- Re: Please build the JIT branch, Michael Goffioul, 2012/07/13
- Re: Please build the JIT branch, Michael Goffioul, 2012/07/13
- Re: Please build the JIT branch, Michael Goffioul, 2012/07/13
- Re: Please build the JIT branch, Michael Goffioul, 2012/07/13
- Re: Please build the JIT branch, Max Brister, 2012/07/14
- Re: Please build the JIT branch, Michael Goffioul, 2012/07/14
- Re: Please build the JIT branch, Michael Goffioul, 2012/07/15
- Re: Please build the JIT branch, Michael Goffioul, 2012/07/15
- Re: Please build the JIT branch, Max Brister, 2012/07/16