Skip to content

Instantly share code, notes, and snippets.

@tastyminerals
Last active January 2, 2021 12:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tastyminerals/f6764ff472c8e0e80301ad36ed34bf69 to your computer and use it in GitHub Desktop.
Save tastyminerals/f6764ff472c8e0e80301ad36ed34bf69 to your computer and use it in GitHub Desktop.
Julia vs Numpy
Description NumPy (MKL) (sec.) Julia (sec.)
Dot (scalar) product of two 300000 arrays (float64), (1000 loops) 0.03528142820068751 0.027905 (x1/1.3)
Element-wise sum of two 100x100 matrices (int), (1000 loops) 0.0037877704002312385 0.0061 (x1.6)
Element-wise multiplication of two 100x100 matrices (float64), (1000 loops) 0.004193491550176986 0.032161 (x7.7)
L2 norm of 500x600 matrix (float64), (1000 loops) 0.023907507749936486 0.096 (x4)
Matrix product of 500x600 and 600x500 matrices (float64) 0.0018566828504845035 0.01988 (x10.7)
Sort of 500x600 matrix (float64) 0.010326230399914493 0.0161 (x1.6)
@VarLad
Copy link

VarLad commented Jan 2, 2021

How about running Julia with MKL too?
I think that's kinda unfair, as MKL is MUCH MORE optimized than OpenBLAS

@VarLad
Copy link

VarLad commented Jan 2, 2021

A simple ]add MKL should do the job

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment