Skip to content

Instantly share code, notes, and snippets.

@Debilski
Created May 18, 2018 11:54
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 Debilski/b6b4bedd3e88fdcfa0987dd46babb356 to your computer and use it in GitHub Desktop.
Save Debilski/b6b4bedd3e88fdcfa0987dd46babb356 to your computer and use it in GitHub Desktop.
Intel distribution for Python benchmark
import sys
import time
import numpy as np
import numpy.random as rn
def fftbench(size):
mat = rn.rand(size, size) + 1j * rn.randn(size, size)
start = time.time()
# 2D transform on a complex-valued matrix:
result = np.fft.fft2(mat)
end = time.time()
print(size, end - start)
if __name__ == '__main__':
for size in sys.argv[1:]:
fftbench(int(size))
# basic anaconda
python fftbench.py 1 10 100 1000 5000 7000 10000 15000 > basic-anaconda
# install intel-enhanced anaconda in a new environment
conda config --add channels intel
conda create --name intelpy intelpython3_full python=3
conda activate intelpy
python fftbench.py 1 10 100 1000 5000 7000 10000 15000 > intel-anaconda
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Debilski
Copy link
Author

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