Skip to content

Instantly share code, notes, and snippets.

View pablogsal's full-sized avatar
🤘

Pablo Galindo Salgado pablogsal

🤘
View GitHub Profile

All benchmarks:

Benchmark 2022-12-21_09-50-main-a7715ccfba5b 2022-12-21_14-11-gc_nogen-663a9654f714
async_tree_io 1.52 sec 658 ms: 2.31x faster
async_tree_memoization 753 ms 397 ms: 1.89x faster
async_tree_none 621 ms 334 ms: 1.86x faster
async_tree_cpu_io_mixed 924 ms 607 ms: 1.52x faster
xml_etree_iterparse 121 ms 98.7 ms: 1.23x faster
#include <elf.h>
#include <fcntl.h>
#include <link.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <elf.h>
#include <fcntl.h>
from importlib.resources import path
import pathlib
from pygments import highlight
from pygments.lexers import PythonLexer
from pygments.formatters import HtmlFormatter
from collections import defaultdict
from dataclasses import dataclass
from memray import FileReader
#include <stdio.h> #include <stdlib.h> #include <sys/mman.h>
#include <stdio.h>
typedef int(*fn)(void*, void*);
typedef int(*lel)(void*);
int say_hello(void* f) {
int* val = (int*)f;
printf("Say hello: %d\n", *val);
sleep(10);
##### Python 3.10
## BB code
types | # objects | total size
============================ | =========== | ============
str | 37328 | 4.51 MB
dict | 6340 | 2.84 MB
code | 10490 | 1.95 MB
type | 1605 | 1.46 MB
Execution counts:
LOAD_FAST: 518802724 19.8% 19.8%
LOAD_ATTR_INSTANCE_VALUE: 262315824 10.0% 29.8%
Misses: 18 0.0%
RESUME: 134268729 5.1% 35.0%
RETURN_VALUE: 129130554 4.9% 39.9%
LOAD_CONST: 118005056 4.5% 44.4%
PRECALL_METHOD: 116316215 4.4% 48.9%
STORE_FAST__LOAD_FAST: 112057797 4.3% 53.1%
POP_JUMP_IF_FALSE: 103428630 4.0% 57.1%
Benchmark 2021-10-07_00-51-master-e6ff4eba6da9 2021-10-13_19-48-master-184f0409a891
unpack_sequence 58.3 ns 54.4 ns: 1.07x faster
regex_effbot 4.11 ms 3.89 ms: 1.06x faster
pickle_dict 37.6 us 35.7 us: 1.05x faster
regex_v8 30.7 ms 29.9 ms: 1.03x faster
regex_dna 274 ms 268 ms: 1.02x faster
float 109 ms 107 ms: 1.02x faster
pickle 13.5 us 13.2 us: 1.02x faster
go 223 ms 219

❯ pyperf compare_to json/2021-10-19_10-10-master-52af0756b2ff.json.gz json/2021-10-19_17-06-master-5c36c0741d78.json.gz --table --table-format=md -G

Benchmark 2021-10-19_10-10-master-52af0756b2ff 2021-10-19_17-06-master-5c36c0741d78
float 108 ms 99.1 ms: 1.09x faster
spectral_norm 144 ms 133 ms: 1.09x faster
regex_v8 31.0 ms 28.6 ms: 1.08x faster
mako 17.5 ms 16.3 ms: 1.07x faster
regex_dna 275 ms 260 ms: 1.06x faster
scimark_fft 430 ms 407 ms: 1.06x faster
tornado_http

❯ pyperf compare_to json/* --table --table-format=md -G

Benchmark 2021-10-19_10-10-master-52af0756b2ff 2021-10-19_14-06-master-70665a9ffafc
pidigits 245 ms 228 ms: 1.07x faster
mako 17.5 ms 16.4 ms: 1.07x faster
spectral_norm 144 ms 136 ms: 1.06x faster
regex_v8 31.0 ms 29.4 ms: 1.06x faster
regex_dna 275 ms 263 ms: 1.05x faster
richards 70.1 ms 67.5 ms: 1.04x faster
xml_etree_parse 190 ms 183 ms: 1.04x faster

github/python/benchmarks  pyenv 3.10.0 (venv) ❯ pyperf compare_to json/* --table --table-format=md -G

Benchmark 2021-10-19_10-10-master-52af0756b2ff 2021-10-19_14-06-master-70665a9ffafc
regex_v8 31.0 ms 29.0 ms: 1.07x faster
pidigits 245 ms 229 ms: 1.07x faster
unpickle 16.8 us 15.8 us: 1.06x faster
mako 17.5 ms 16.8 ms: 1.04x faster
regex_dna 275 ms 265 ms: 1.04x faster
spectral_norm 144 ms 139 ms: 1.03x faster