Skip to content

Instantly share code, notes, and snippets.

View jpivarski's full-sized avatar

Jim Pivarski jpivarski

View GitHub Profile
@jpivarski
jpivarski / growablebuffer.py
Last active April 1, 2020 16:40
GrowableBuffer in Numba
import sys
import operator
import numpy
# Note: these are pre-0.49 locations; things move around in Numba 0.49.
import numba
import numba.typing.arraydecl
# First, let's define the class in Python.
@jpivarski
jpivarski / hist.py
Last active April 22, 2019 07:46
Functional histogram slice proposal
import numbers
import math
import numpy
class Binning:
"Abstract superclass of all binning types. Only Regular is implemented."
def __init__(self, *args, **kwargs):
raise NotImplementedError
@jpivarski
jpivarski / xsimd.ipynb
Last active August 13, 2018 14:58
AVX-512 cumsum implementation
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jpivarski
jpivarski / ReadOneBranch.java
Last active November 4, 2016 17:50
Performance test comparison of C++ ROOT and Java ROOT
import hep.io.root.core.RootInput;
import hep.io.root.*;
import hep.io.root.interfaces.*;
public class ReadOneBranch {
final static long itemsPerPrint = 100000L;
static long lastTime = 0L;
static long items = 0;
private static void printout() {