You're really just comparing BLASes. So the question is what BLAS is each system using? You can find out in Julia using versioninfo().
> On Jan 8, 2015, at 1:27 PM, Dakota St. Laurent <[email protected]> > wrote: > > hi all, I've been trying to test some simple benchmarks for my new job to see > what language we should use between Python (Numpy/Scipy) and Julia. I like > how simple it seems for Julia to do things in parallel (we plan to be running > code on a supercomputer using lots and lots of cores), but I'm not getting > the ideal benchmarks. I'm sure I'm doing something wrong here. > > Python code: > > import time, numpy as np > N = 25000 > A = np.random.rand(N,N) > x = np.random.rand(N) > > t0 = time.clock() > A.dot(x) > print time.clock() - t0 > > -------------------------------- > > Julia code: > > function rand_mat_vec_mul(A::Array{Float64, 2}, x::Array{Float64,1}) > tic() > A * x > toc() > end > > # warmup > rand_mat_vec_mul(rand(1000,1000), rand(1000)) > rand_mat_vec_mul(rand(1000,1000), rand(1000)) > rand_mat_vec_mul(rand(1000,1000), rand(1000)) > > # timing > rand_mat_vec_mul(rand(25000,25000), rand(25000)) > > --------------------------- > > Python generally takes about 0.630 - 0.635 seconds, Julia generally takes > about 0.640 - 0.650 seconds. as I said, I'm sure I'm doing something wrong, > I'm just not really sure what. any help is appreciated :)
