Dear All,
I encountered the following issues when running ox7 on an iMac OS X 10.7.5, with a quad core processor intel i7 (2.93GHz).
1) The same ox program (see below) runs about 30% faster when I use OxEdit versus OxMetrics on the Mac (there is no difference on a Windows server 2008). This is true for other ox programs I tried.
2) Making the for loop parallel doesn't make any difference to speed on the Mac -- in fact it slows it somewhat. (works as expected on the Windows server)
Any hints? Are these known problems when running Ox on a Mac?
Thanks,
Sophocles
~~~~~~~~
the code:
#include <oxstd.h>
main()
{
decl timer = time();
decl nrep = 1e6;
decl vs2 = new matrix[nrep][1];
decl cn = 1000;
decl i;
parallel for(i = 0; i < nrep; ++i)
vs2[i] = meanc(sqr(rann(cn,1)));
println(cn~meanc(vs2));
println("elapsed time: ", timespan(timer));
}
|