Created
April 15, 2015 12:02
-
-
Save gmarkall/1fad69775ae6e23e2523 to your computer and use it in GitHub Desktop.
inspect types, llvm, and asm in Numba
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from numba import njit | |
@njit | |
def f(arr1, arr2): | |
for i in range(len(arr1)): | |
arr1[i] += arr2[i] | |
a = np.arange(10) | |
b = np.arange(10) | |
f(a, b) | |
f.inspect_types() | |
llvm = f.inspect_llvm() | |
for k, v in llvm.items(): | |
print(k) | |
print(v) | |
print() | |
asm = f.inspect_asm() | |
for k, v in asm.items(): | |
print(k) | |
print(v) | |
print() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment