Skip to content

Instantly share code, notes, and snippets.

View pablogsal's full-sized avatar

Pablo Galindo Salgado pablogsal

View GitHub Profile
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
❯ pyperf compare_to json/* --table -G
+-------------------------+--------------------------------------+--------------------------------------+
| Benchmark | 2021-10-09_15-16-master-ec04db74e24a | 2021-10-09_15-51-master-b4903afd4deb |
+=========================+======================================+======================================+
| nbody | 155 ms | 151 ms: 1.03x faster |
+-------------------------+--------------------------------------+--------------------------------------+
| float | 108 ms | 105 ms: 1.02x faster |
+-------------------------+--------------------------------------+--------------------------------------+
| unpickle | 17.1 us | 16.8 us: 1.02x faster |
+-------------------------+--------------------------------------+--------------------------------------+
### Keybase proof
I hereby claim:
* I am pablogsal on github.
* I am pablogsal (https://keybase.io/pablogsal) on keybase.
* I have a public key ASAcTBbuHO2Jvb_lkBKHfQqtCDCvPmKj6H-vVTRysLcdMgo
To claim this, I am signing this object:
#!/usr/bin/env python3
import pytz
from zoneinfo import ZoneInfo
from datetime import datetime, timedelta, timezone
from dateutil import tz
from zoneinfo import ZoneInfo
Tune the system configuration to run benchmarks
Actions
=======
Perf event: Max sample rate set to 1 per second
CPU Frequency: Minimum frequency of CPU 17,35 set to the maximum frequency
Turbo Boost (MSR): Turbo Boost disabled on CPU 17: MSR 0x1a0 set to 0x4000850089
IRQ affinity: Set default affinity to CPU 0-16,18-34
IRQ affinity: Set affinity of IRQ 1,3-16,21,25-31,56-59,68-85,87,89-90,92-93,95-104 to CPU 0-16,18-34
+------------------------+--------------------------------------+-------------------------------------------+
| Benchmark | 2020-10-21_20-34-master-f8b1ccd63c94 | 2020-10-27_01-07-load_method-4554b7a8a9a8 |
+========================+======================================+===========================================+
| pidigits | 263 ms | 233 ms: 1.13x faster (-12%) |
+------------------------+--------------------------------------+-------------------------------------------+
| go | 296 ms | 279 ms: 1.06x faster (-6%) |
+------------------------+--------------------------------------+-------------------------------------------+
| deltablue | 9.20 ms | 8.72 ms: 1.05x faster (-5%) |
+------------------------+--------------------------------------+-------------------------------------------+
| logging_simple | 9.84 us