java.lang.Object | +----java.awt.Component | +----java.awt.Container | +----java.awt.Panel | +----GWin | +----Project | +----TestMatrix
This code is (c) 1997 Leemon Baird
<leemon@cs.cmu.edu>,
http://www.cs.cmu.edu/~baird
The source and object code may be redistributed freely.
If the code is modified, please state so in the comments.
This was tested with Symantec Cafe 1.51 with JIT 3.0 beta 3, with both pure Java, and with the MatrixD.dll (compiled by Microsoft Visual C++ Developer Studio, 1995 version). The test was run under WinNT on a 200 MHz Pentium Pro.
MatrixF: exp=0, iter=5000, size= 30 seconds(with/without DLL)= 3.484 17.735 MatrixD: exp=0, iter=5000, size= 30 seconds(with/without DLL)= 3.906 18.062 MatrixF: exp=1, iter=5000, size= 30 seconds(with/without DLL)= 3.453 17.735 MatrixD: exp=1, iter=5000, size= 30 seconds(with/without DLL)= 3.89 18.047 MatrixF: exp=2, iter=5000, size= 30 seconds(with/without DLL)= 3.344 17.39 MatrixD: exp=2, iter=5000, size= 30 seconds(with/without DLL)= 3.719 17.625 MatrixF: exp=3, iter= 200, size= 30 seconds(with/without DLL)= 0.125 0.672 MatrixD: exp=3, iter= 200, size= 30 seconds(with/without DLL)= 0.14 0.688 MatrixF: exp=0, iter= 4, size=300 seconds(with/without DLL)= 5.985 18.141 MatrixD: exp=0, iter= 4, size=300 seconds(with/without DLL)=10.203 21.938 MatrixF: exp=1, iter= 4, size=300 seconds(with/without DLL)= 5.985 18.125 MatrixD: exp=1, iter= 4, size=300 seconds(with/without DLL)=10.219 22.016 MatrixF: exp=2, iter= 4, size=300 seconds(with/without DLL)= 5.766 17.921 MatrixD: exp=2, iter= 4, size=300 seconds(with/without DLL)= 9.969 21.844 MatrixF: exp=3, iter= 4, size=300 seconds(with/without DLL)= 5.719 17.875 MatrixD: exp=3, iter= 4, size=300 seconds(with/without DLL)= 9.937 21.766MatrixD is used throughout WebSim. These numbers were checked with Cafe's compiler set for "debug" and "release", and the speed was equal in both cases.
public TestMatrix()
public String BNF(int lang)
public void unparse(Unparser u, int lang)
public Object parse(Parser p, int lang) throws ParserException
public void run()
public void test(int exp, int iter, int size)
public void testD(int exp, int iter, int size, boolean useNative)
public void testF(int exp, int iter, int size, boolean useNative)