Skip to content

Instantly share code, notes, and snippets.

@brunojacobs
brunojacobs / bench_rec_array_with_nt_and_sf.py
Last active August 30, 2021 19:43
Extension to https://gist.github.com/ufechner7/95db14f734edd51dcd9b that includes namedtuple and structref benchmarks (and made Python3 compatible)
import sys
import time
import timeit
import numba
import numpy as np
N_REPS = 1000000
@numba.njit
def sub(a, b, result):