Skip to content

Instantly share code, notes, and snippets.

View mdboom's full-sized avatar

Michael Droettboom mdboom

View GitHub Profile
Bytecode % time count % count time per count (μs)
LOAD_FAST 9.39% 37493180620 17.73% 10.371034
LOAD_GLOBAL_BUILTIN 4.88% 5783991967 2.74% 34.913583
STORE_FAST 4.19% 13496553043 6.38% 12.855703
LOAD_FAST_LOAD_FAST 3.86% 11054418342 5.23% 14.456627
CALL_PY_EXACT_ARGS 3.74% 3213705626 1.52% 48.208125
LOAD_ATTR_INSTANCE_VALUE 3.41% 4851620533 2.29% 29.071453
LOAD_GLOBAL_MODULE 3.39% 3350520281 1.58% 41.905893
FOR_ITER_LIST 3.32% 2200274562 1.04% 62.401681
BINARY_OP_SUBSCR_LIST_INT 3.05% 2720924671 1.29% 46.348191
@mdboom
mdboom / profile-type_new.py
Last active January 14, 2025 20:22 — forked from ericsnowcurrently/profile-type_new.py
a script to instrument and profile type_new()
from collections import namedtuple
import logging
import os
import os.path
import re
import shutil
import subprocess
import sys
import textwrap
import time

2to3

percentage object symbol category
26.48% python _PyEval_EvalFrameDefault interpreter
3.04% python unicodekeys_lookup_unicode lookup
3.01% python _PyObject_Malloc memory
2.94% python gc_collect_region.isra.0 gc
2.35% python _Py_dict_lookup lookup
from collections import defaultdict
import json
from operator import itemgetter
import math
from matplotlib import pyplot as plt
import numpy as np
excluded = set(
from collections import defaultdict
import json
from operator import itemgetter
import math
from matplotlib import pyplot as plt
import numpy as np
excluded = set(

313-docbuild

percentage object symbol category
27.43% python _PyEval_EvalFrameDefault interpreter
11.89% python gc_collect_main gc
2.83% python sre_ucs1_match library
2.46% python unicodekeys_lookup_unicode lookup
2.39% python _PyType_LookupRef lookup

313

percentage object symbol category
13.67% python _PyEval_EvalFrameDefault interpreter
6.07% python gc_collect_main gc
4.77% python unicodekeys_lookup_unicode lookup
2.73% python _PyObject_Malloc memory
2.36% python _PyType_LookupRef lookup

2to3

percentage object symbol category
30.17% python _PyEval_EvalFrameDefault interpreter
2.38% python type_new memory
2.17% python deduce_unreachable gc
2.14% python gc_collect_region.isra.0 gc
1.86% python tuple_dealloc memory
This file has been truncated, but you can view the full file.
// 42b823dd93eac573fa501050980cc3aa37ea73edd06e71d225164b3ef93e787f
// $ 'C:\Program Files\Python311\python.exe' 'C:\actions-runner\_work\benchmarking\benchmarking\cpython\Tools\jit\build.py' x86_64-pc-windows-msvc
void
emit__BINARY_OP(
unsigned char *code, unsigned char *data, _PyExecutorObject *executor,
const _PyUOpInstruction *instruction, jit_state *state)
{
//
// C:\Users\DDFUN\AppData\Local\Temp\tmpwlwcrdc9\_BINARY_OP.o: file format coff-x86-64