Skip to content

Instantly share code, notes, and snippets.

~/pandas/asv_bench$ asv continuous -e 6c30cbecf8 upstream/master
before after ratio
[6c30cbec] [e5ed87b3]
+ 390.54μs 3.23ms 8.27 stat_ops.stats_rolling_mean.time_rolling_sum
+ 686.33μs 3.47ms 5.06 stat_ops.stats_rolling_mean.time_rolling_mean
+ 22.32ms 110.21ms 4.94 gil.nogil_rolling_algos_fast.time_nogil_rolling_mean
+ 69.84ms 305.07ms 4.37 groupby.groupby_multi.time_groupby_multi_python
+ 14.66ms 57.83ms 3.95 timedelta.timedelta_convert_string.time_timedelta_convert_string
+ 1.01ms 3.86ms 3.82 stat_ops.stats_rolling_mean.time_rolling_var
+ 17.75ms 56.57ms 3.19 timedelta.timedelta_convert_string_seconds.time_timedelta_convert_string_seconds
@pv
pv / rootfinder.py
Last active March 2, 2017 09:20
Function approximation and root finding from interpolants
"""
Function approximation via adaptive sampling + using it for root finding.
"""
# Pauli Virtanen <pav@iki.fi>, 2014
from __future__ import division, print_function, absolute_import
import numpy as np
from scipy import interpolate
import numpy as np
from math import sin, pi
from scipy.integrate import quad
def remainder_map(a, b, xs, xe):
period = xe - xs
interval = b - a
n_periods, left = divmod(interval, period)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pv
pv / qhull_test.c
Last active August 11, 2016 17:48
#include <stdlib.h>
#include <libqhull_r/libqhull_r.h>
static double points[] = {
0.16577534087020684, -1.4005379279472099,
1.3471447295999897, 0.1881148811227809,
1.2882417449678667, -2.2184892610712645,
105.76092199244057, -78.34866809894842,
-1.4890379590829337, -0.19466063858976068,
numpy/benchmarks$ asv --version
asv 0.3.dev1069+3f14e671
numpy/benchmarks$ time asv run -E existing --bench bench_core
· Discovering benchmarks
· Running 29 total benchmarks (1 commits * 1 environments * 29 benchmarks)
[ 0.00%] ·· Building for existing-py_usr_bin_python
[ 0.00%] ·· Benchmarking existing-py_usr_bin_python
[ 3.45%] ··· Running bench_core.Core.time_arange_100 525.16ns
[ 6.90%] ··· Running bench_core.Core.time_array_1 343.88ns
[ 10.34%] ··· Running bench_core.Core.time_array_empty 545.93ns
! testdpotr_test_gh_2691.f90
!
! Direct Fortran translation of the Scipy test
! TestDpotr.test_gh_2691
!
subroutine garbage(okflag)
implicit none
integer, intent(out) :: okflag
double precision, dimension(3,3) :: a, a2
integer, parameter :: lwork = 100
@pv
pv / Makefile
Last active August 12, 2017 15:08
LAPACK test suite makefile
#
# Makefile for running LAPACK testsuite
#
FC = gfortran
FFLAGS = -O2
LDFLAGS =
LIBS = -llapack -lblas
LD = $(FC)
AR = ar
@pv
pv / vg.log
Last active April 2, 2018 18:19
pypy3-2781-vg.log
$ pypy3
Python 3.5.3 (47bcad155e44, Mar 30 2018, 19:05:26)
[PyPy 5.11.0-alpha0 with GCC 7.3.1 20180303 (Red Hat 7.3.1-5)] on linux
$ OPT="-O0 -ggdb" pypy3 -mpip install numpy==1.14.2
$ cat runthis.py
import numpy as np
print(np.__file__, np.__version__)
x = np.zeros([1], dtype=int)
$ make diff
...
$ make diff
make -s run "PYTHON=/home/pauli/prj/scipy/cutestrunpy/env/bin/python" "SCRIPT=cutest_slsqp.py" PYCUTEST_CACHE="/home/pauli/prj/scipy/cutestrunpy/cache/installed" 2>&1|tee run-installed.log
1.1.0
==============================================================
| name | nit | nfev |success |cons_ok |ok_trust_constr|
--------------------------------------------------------------
| HS7 | 11 | 14 | 1 | 1 | 1 |
| HS10 | 11 | 12 | 1 | 1 | 1 |