Skip to content

Instantly share code, notes, and snippets.

Matti Picus mattip

Block or report user

Report or block mattip

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:76bebd7a8607adf833aea5663bd308bd
diff -r 52462bc541a3 rpython/translator/c/gc.py
--- a/rpython/translator/c/gc.py Wed May 08 15:23:23 2019 +0200
+++ b/rpython/translator/c/gc.py Fri May 10 09:17:44 2019 +0300
@@ -461,10 +461,10 @@
raise Exception("gc_pop_roots should be removed by postprocess_graph")
def OP_GC_ENTER_ROOTS_FRAME(self, funcgen, op):
- return '%s += sizeof(pypy_ss_t);' % (funcgen.gcpol_ss,)
+ return '(char*)(%s) += sizeof(pypy_ss_t);' % (funcgen.gcpol_ss,)
@mattip
mattip / Dockerfile
Last active Apr 7, 2019
Building on aarch64
View Dockerfile
FROM armhf/ubuntu:xenial
RUN apt update
RUN apt-get -y install virtualenv buildbot-slave python-pytest python-hypothesis \
netbase gdb ncurses-term pypy locales mercurial gcc make libffi-dev pkg-config \
zlib1g-dev libbz2-dev libsqlite3-dev libncurses5-dev libexpat1-dev libssl-dev \
libgdbm-dev tk-dev libgc-dev python-cffi liblzma-dev libncursesw5-dev
RUN hg clone https://bitbucket.org/pypy/pypy
@mattip
mattip / code.js
Last active Feb 16, 2019
Recreating the speed.pypy.org bottom plot. The runner script forces two iterations "base" and "changed", and does not write the sys.version_info of each
View code.js
// This is the code from codespeed https://github.com/mattip/codespeed/blob/5a3bb8ca11e6468a515a4550198d6c21870210ba/example/templates/home.html#L94
// Prepare and render second plot
var geomeans = [1.0];
var num_of_benchs = 0;
for (var i in data['tagged_revs']) {
num_of_benchs = tagged_data[i].length;
var tempgeo = 1;
for (var j in tagged_data[i]) {
tempgeo *= tagged_data[i][j];
@mattip
mattip / benchmarks.rst
Created Feb 9, 2019
pypy2 v7.0 vs pypy2 with regalloc branch
View benchmarks.rst
Benchmark pypy2_1 pypy2regalloc_1 pypy2regalloc_2 pypy2regalloc_3
crypto_pyaes 5.62 ms not significant 5.92 ms: 1.05x slower (+5%) not significant
json_loads 12.2 us not significant not significant 11.6 us: 1.05x faster (-5%)
json_loads | 12.2 us | not significant | not significant | 11.6 us: 1.05x faster (-5%) |
@mattip
mattip / pypy2_to_pypy3utf.rst
Last active Feb 7, 2019
pypy3utf8 speed comparison to pypy2.7v7.0, pypy3.5v7.0
View pypy2_to_pypy3utf.rst

I ran the python performance suite (not our benchmark suite) 3 times for pypy2, pypy3 v7.0 and pypy3 unicode-utf8

for i in seq 1 3; do pyperformance run --python=$python -o $prefix_$i.json; done

python -mperf compare_to pypy3_1.json pypy2_1.json pypy3utf8*.json--min-speed 5 --table

@mattip
mattip / pypy2_to_pypy2utf8.rst
Last active Feb 7, 2019
PyPy 2 utf8 and cpython speed comparisons
View pypy2_to_pypy2utf8.rst

I ran the python performance suite (not our benchmark suite) 3 times for pypy2 v7.0 and pypy2 unicode-utf8

for i in seq 1 3; do pyperformance run --python=$python -o $prefix_$i.json; done

python -mperf compare_to python2_1.json pypy2_*.json --min-speed 5 --table

@mattip
mattip / dtypes.md
Created Jan 31, 2019
Dtype Thoughts
View dtypes.md
tags
Dtype, NumPy

Dtype Thoughts

Goals:

  • Clarify the meaning of np.dtype. It is documented as "Create a data type object". But it is a class. When I do int(100) it creates an instance of the int class, with 100 as one of its attributes. However, np.dtype(int8) actually returns a singleton instance of the np.dtype class set up with methods and attributes that are totally different from np.dtype([('x','int'), ('y', int)]). So what is np.dtype?
@mattip
mattip / cppyy.diff
Created Jan 23, 2019
diff to fix test_site
View cppyy.diff
diff -r 49aade4a2c18 pypy/module/_cppyy/pythonify.py
--- a/pypy/module/_cppyy/pythonify.py Sun Jan 20 19:10:23 2019 +0200
+++ b/pypy/module/_cppyy/pythonify.py Wed Jan 23 22:55:42 2019 +0200
@@ -1,8 +1,10 @@
# NOT_RPYTHON
# do not load _cppyy here, see _post_import_startup()
-import types
import sys
+class _C:
@mattip
mattip / gist:b7aeb83f2fb5203c33c51715af2f5b7d
Last active Jan 14, 2019
utf8-unicode-py3 before and after dictstrategy changes
View gist:b7aeb83f2fb5203c33c51715af2f5b7d
Speeds up chameleon, sympy_integrate is unstable
python -mperf compare_to pypy3utf8_2.json pypy3utf8_udict_*.json --min-speed 5
2to3
====
Mean +- std dev: [pypy3utf8_2] 2.54 sec +- 0.02 sec -> [pypy3utf8_udict_1] 2.53 sec +- 0.03 sec: 1.00x faster (-0%)
Mean +- std dev: [pypy3utf8_2] 2.54 sec +- 0.02 sec -> [pypy3utf8_udict_2] 2.51 sec +- 0.02 sec: 1.01x faster (-1%)
Mean +- std dev: [pypy3utf8_2] 2.54 sec +- 0.02 sec -> [pypy3utf8_udict_3] 2.53 sec +- 0.04 sec: 1.00x faster (-0%)
@mattip
mattip / gist:05be0be1ef0f169e0ff96bf0cafc9404
Last active Jan 10, 2019
py3.5 comparison to unicode-utf8-py3 and pypy2 comparison to unicode-utf8-py3
View gist:05be0be1ef0f169e0ff96bf0cafc9404
I ran the python performance suite (not our benchmark suite) 3 times for each pypy3 latest nightly and pypy3
on the unicode-utf8-py3 branch commit 95595-316992f1c55d
for i in `seq 1 3`; do pyperformance run --python=pypy-c-jit-95576-f638e10d6074-linux64/bin/pypy3 -o pypy3_$i.json; done
for i in `seq 1 3`; do pyperformance run --python=pypy-c-jit-95575-82d3ff852926-linux64/bin/pypy3 -o pypy3utf8_$i.json; done
python -mperf compare_to pypy3*.json --min-speed 5
2to3
====
You can’t perform that action at this time.