Skip to content

Latest commit

 

History

History
4957 lines (4662 loc) · 102 KB

bm-20250121-azure-x86_64-brandtbucher-remove_optimizer_api-3.14.0a4+-085e172-pystats-argparse-vs-base.md

File metadata and controls

4957 lines (4662 loc) · 102 KB

Execution counts

Execution counts for Tier 1 instructions.

The "miss ratio" column shows the percentage of times the instruction executed that it deoptimized. When this happens, the base unspecialized instruction is not counted.

Name Base Count Head Count Change
JUMP_BACKWARD 1,986,331 15 -100.0%
BINARY_OP_ADD_UNICODE 293,857 507,458 72.7%
BINARY_OP_INPLACE_ADD_UNICODE 300,304 513,905 71.1%
FOR_ITER_TUPLE 597,884 918,286 53.6%
CALL_BUILTIN_FAST_WITH_KEYWORDS 680,680 894,281 31.4%
TO_BOOL_STR 1,187,122 1,400,703 18.0%
TO_BOOL_BOOL 4,243,984 4,671,186 10.1%
CALL_METHOD_DESCRIPTOR_FAST 4,354,567 4,781,769 9.8%
LOAD_ATTR_MODULE 2,286,343 2,499,944 9.3%
POP_JUMP_IF_TRUE 5,780,604 6,207,786 7.4%
LOAD_METHOD_NO_DICT 8,510,647 8,937,849 5.0%
ENTER_EXECUTOR 2,687,052 2,580,194 -4.0%
LOAD_FAST 66,611,946 68,134,322 2.3%
LOAD_GLOBAL_MODULE 9,937,033 10,150,634 2.1%
STORE_FAST 21,141,813 21,569,015 2.0%
PUSH_NULL 11,896,909 12,110,510 1.8%
LOAD_FAST_LOAD_FAST 12,388,454 12,602,055 1.7%
POP_JUMP_IF_FALSE 12,498,617 12,712,198 1.7%
POP_ITER 2,539,618 2,566,904 1.1%
BINARY_SUBSCR_STR_INT 695,844 695,824 -0.0%
CONTAINS_OP 1,567,288 1,567,268 -0.0%
LOAD_METHOD 1,545,647 1,545,628 -0.0%
NOP 2,566,432 2,566,413 -0.0%
RESUME_CHECK 10,509,334 10,509,295 -0.0%
LOAD_SMALL_INT 5,952,680 5,952,660 -0.0%
LOAD_ATTR_INSTANCE_VALUE 13,393,199 13,393,160 -0.0%
CALL_PY_EXACT_ARGS 6,835,299 6,835,280 -0.0%
LOAD_CONST_IMMORTAL 17,674,041 17,674,021 -0.0%
RETURN_VALUE 11,514,179 11,514,179 0.0%
LOAD_GLOBAL_BUILTIN 11,155,965 11,155,965 0.0%
STORE_ATTR_INSTANCE_VALUE 7,054,033 7,054,033 0.0%
POP_TOP 6,584,307 6,584,307 0.0%
LOAD_METHOD_WITH_VALUES 4,739,205 4,739,205 0.0%
LOAD_DEREF 4,454,331 4,454,331 0.0%
GET_ITER 3,364,860 3,364,860 0.0%
LOAD_CONST_MORTAL 3,189,416 3,189,416 0.0%
FOR_ITER_LIST 3,135,895 3,135,895 0.0%
BUILD_LIST 3,064,169 3,064,169 0.0%
BUILD_MAP 2,687,041 2,687,041 0.0%
COMPARE_OP_INT 2,110,151 2,110,151 0.0%
BUILD_TUPLE 2,068,285 2,068,285 0.0%
BINARY_SUBSCR_DICT 2,061,625 2,061,625 0.0%
POP_JUMP_IF_NOT_NONE 2,003,602 2,003,602 0.0%
STORE_SUBSCR_DICT 1,947,893 1,947,893 0.0%
CALL_BUILTIN_FAST 1,920,251 1,920,251 0.0%
TO_BOOL_LIST 1,833,219 1,833,219 0.0%
CHECK_EXC_MATCH 1,613,890 1,613,890 0.0%
POP_EXCEPT 1,613,890 1,613,890 0.0%
PUSH_EXC_INFO 1,613,890 1,613,890 0.0%
CALL_LIST_APPEND 1,613,376 1,613,376 0.0%
CALL_BUILTIN_CLASS 1,502,146 1,502,146 0.0%
COPY_FREE_VARS 1,474,896 1,474,896 0.0%
BINARY_OP 1,471,305 1,471,305 0.0%
CALL_ISINSTANCE 1,392,291 1,392,291 0.0%
SWAP 1,380,288 1,380,288 0.0%
CALL_NON_PY_GENERAL 1,282,468 1,282,468 0.0%
TO_BOOL_INT 1,250,131 1,250,131 0.0%
JUMP_FORWARD 1,184,158 1,184,158 0.0%
MAKE_CELL 1,148,093 1,148,093 0.0%
CALL_PY_GENERAL 1,139,675 1,139,675 0.0%
CALL_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS 1,109,045 1,109,045 0.0%
COMPARE_OP_STR 1,061,822 1,061,822 0.0%
IS_OP 1,039,674 1,039,674 0.0%
INTERPRETER_EXIT 1,006,634 1,006,634 0.0%
COPY 1,006,627 1,006,627 0.0%
STORE_FAST_STORE_FAST 982,671 982,671 0.0%
BINARY_SLICE 939,683 939,683 0.0%
CALL_LEN 931,217 931,217 0.0%
STORE_DEREF 884,104 884,104 0.0%
CONTAINS_OP_DICT 863,554 863,554 0.0%
POP_JUMP_IF_NONE 856,291 856,291 0.0%
CALL_METHOD_DESCRIPTOR_O 814,332 814,332 0.0%
FOR_ITER 765,911 765,911 0.0%
LOAD_ATTR 751,712 751,712 0.0%
RAISE_VARARGS 732,072 732,072 0.0%
RERAISE 623,925 623,925 0.0%
BINARY_OP_ADD_INT 598,534 598,534 0.0%
CALL_TYPE_1 565,695 565,695 0.0%
CALL_KW_PY 532,398 532,398 0.0%
TO_BOOL_NONE 517,877 517,877 0.0%
CALL_BUILTIN_O 499,215 499,215 0.0%
CALL_FUNCTION_EX 490,892 490,892 0.0%
DICT_MERGE 482,502 482,502 0.0%
UNPACK_SEQUENCE_TWO_TUPLE 476,382 476,382 0.0%
LOAD_SUPER_METHOD_METHOD 457,543 457,543 0.0%
LOAD_ATTR_SLOT 449,232 449,232 0.0%
JUMP_BACKWARD_NO_INTERRUPT 449,226 449,226 0.0%
LIST_APPEND 424,277 424,277 0.0%
CONTAINS_OP_SET 401,051 401,051 0.0%
BINARY_SUBSCR_GETITEM 395,481 395,481 0.0%
SET_FUNCTION_ATTRIBUTE 387,404 387,404 0.0%
CALL_METHOD_DESCRIPTOR_NOARGS 385,859 385,859 0.0%
FOR_ITER_RANGE 378,530 378,530 0.0%
IMPORT_NAME 375,701 375,701 0.0%
COMPARE_OP 371,594 371,594 0.0%
LOAD_FAST_AND_CLEAR 366,037 366,037 0.0%
MAKE_FUNCTION 338,710 338,710 0.0%
BINARY_OP_SUBTRACT_INT 299,524 299,524 0.0%
EXTENDED_ARG 298,265 298,265 0.0%
CALL_KW_NON_PY 290,826 290,826 0.0%
BINARY_SUBSCR_LIST_INT 273,189 273,189 0.0%
UNPACK_SEQUENCE_TUPLE 248,988 248,988 0.0%
TO_BOOL 241,616 241,616 0.0%
UNARY_INVERT 217,662 217,662 0.0%
CALL_BOUND_METHOD_EXACT_ARGS 190,789 190,789 0.0%
BINARY_SUBSCR 183,269 183,269 0.0%
EXIT_INIT_CHECK 174,710 174,710 0.0%
CALL_ALLOC_AND_ENTER_INIT 174,710 174,710 0.0%
BINARY_OP_MULTIPLY_INT 149,750 149,750 0.0%
UNPACK_SEQUENCE_LIST 149,742 149,742 0.0%
LOAD_SUPER_ATTR_ATTR 133,104 133,104 0.0%
LIST_EXTEND 124,785 124,785 0.0%
STORE_SUBSCR 108,219 108,219 0.0%
IMPORT_FROM 108,147 108,147 0.0%
STORE_FAST_LOAD_FAST 99,439 99,439 0.0%
NOT_TAKEN 84,085 84,085 0.0%
BINARY_SUBSCR_TUPLE_INT 83,308 83,308 0.0%
CALL_INTRINSIC_1 83,190 83,190 0.0%
FORMAT_SIMPLE 66,552 66,552 0.0%
CONVERT_VALUE 66,552 66,552 0.0%
CALL_BOUND_METHOD_GENERAL 66,552 66,552 0.0%
CALL_KW_BOUND_METHOD 58,232 58,232 0.0%
BUILD_STRING 33,276 33,276 0.0%
LOAD_ATTR_CLASS 24,956 24,956 0.0%
CALL 437 437 0.0%
LOAD_GLOBAL 194 194 0.0%
LOAD_CONST 136 136 0.0%
BINARY_OP_SUBTRACT_FLOAT 69 69 0.0%
CALL_KW 47 47 0.0%
UNPACK_SEQUENCE 36 36 0.0%
STORE_ATTR 34 34 0.0%
RESUME 20 20 0.0%
STORE_SUBSCR_LIST_INT 10 10 0.0%
LOAD_ATTR_PROPERTY 8 8 0.0%
LOAD_SUPER_METHOD 6 6 0.0%
UNARY_NOT 6 6 0.0%
LOAD_ATTR_CLASS_WITH_METACLASS_CHECK 4 4 0.0%
CALL_TUPLE_1 2 2 0.0%
LOAD_SUPER_ATTR 1 1 0.0%
UNARY_NEGATIVE 1 1 0.0%
JUMP_BACKWARD_JIT 1,982,291
JUMP_BACKWARD_NO_JIT 324,441

Pair counts

Pair counts for top 100 opcode pairs

Pairs of specialized operations that deoptimize and are then followed by the corresponding unspecialized instruction are not counted as pairs.

Not included in comparative output.

Predecessor/Successor Pairs

Top 5 predecessors and successors of each Tier 1 opcode.

This does not include the unspecialized instructions that occur after a specialized instruction deoptimizes.

Not included in comparative output.

Specialization stats

Specialization stats by family

BINARY_OP

specialization stats for BINARY_OP family
Kind Base Count Base Ratio Head Count Head Ratio Change
deferred

Lists the number of "deferred" (i.e. not specialized) instructions executed.

1,470,561 40.8% 1,470,561 40.8% 0.0%
hit

Specialized instructions that complete.

2,129,828 59.1% 2,129,828 59.1% 0.0%
Success Base Count Base Ratio Head Count Head Ratio Change
Success 28 3.8% 28 3.8% 0.0%
Failure 716 96.2% 716 96.2% 0.0%
Failure kind Base Count Base Ratio Head Count Head Ratio Change
remainder 337 47.1% 337 47.1% 0.0%
and int 231 32.3% 231 32.3% 0.0%
multiply different types 97 13.5% 97 13.5% 0.0%
or 51 7.1% 51 7.1% 0.0%

BINARY_SLICE

specialization stats for BINARY_SLICE family
Kind Base Count Base Ratio Head Count Head Ratio Change
deferred

Lists the number of "deferred" (i.e. not specialized) instructions executed.

939,683 100.0% 939,683 100.0% 0.0%

BINARY_SUBSCR

specialization stats for BINARY_SUBSCR family
Kind Base Count Base Ratio Head Count Head Ratio Change
deferred

Lists the number of "deferred" (i.e. not specialized) instructions executed.

183,038 4.3% 183,038 4.3% 0.0%
hit

Specialized instructions that complete.

4,059,895 95.7% 4,059,895 95.7% 0.0%
miss

Specialized instructions that deopt.

8 0.0% 8 0.0% 0.0%
Success Base Count Base Ratio Head Count Head Ratio Change
Success 32 13.9% 32 13.9% 0.0%
Failure 199 86.1% 199 86.1% 0.0%
Failure kind Base Count Base Ratio Head Count Head Ratio Change
list slice 101 50.8% 101 50.8% 0.0%
string slice 98 49.2% 98 49.2% 0.0%

CALL

specialization stats for CALL family
Kind Base Count Base Ratio Head Count Head Ratio Change
deferred

Lists the number of "deferred" (i.e. not specialized) instructions executed.

67 0.0% 67 0.0% 0.0%
hit

Specialized instructions that complete.

26,058,868 99.6% 26,058,868 99.6% 0.0%
miss

Specialized instructions that deopt.

98,883 0.4% 98,883 0.4% 0.0%
Success Base Count Base Ratio Head Count Head Ratio Change
Success 2,232 100.0% 2,232 100.0% 0.0%
Failure 0 0.0% 0 0.0%
Failure kind Base Count Base Ratio Head Count Head Ratio Change
init not simple 1 1 / 0 !! 1 1 / 0 !! 0.0%

CALL_KW

specialization stats for CALL_KW family
Kind Base Count Base Ratio Head Count Head Ratio Change
deferred

Lists the number of "deferred" (i.e. not specialized) instructions executed.

21 44.7% 21 44.7% 0.0%
Success Base Count Base Ratio Head Count Head Ratio Change
Success 26 100.0% 26 100.0% 0.0%
Failure 0 0.0% 0 0.0%

COMPARE_OP

specialization stats for COMPARE_OP family
Kind Base Count Base Ratio Head Count Head Ratio Change
deferred

Lists the number of "deferred" (i.e. not specialized) instructions executed.

357,168 9.2% 357,168 9.2% 0.0%
hit

Specialized instructions that complete.

3,237,534 83.8% 3,237,534 83.8% 0.0%
miss

Specialized instructions that deopt.

253,585 6.6% 253,585 6.6% 0.0%
Success Base Count Base Ratio Head Count Head Ratio Change
Success 4,741 24.8% 4,741 24.8% 0.0%
Failure 14,389 75.2% 14,389 75.2% 0.0%
Failure kind Base Count Base Ratio Head Count Head Ratio Change
different types 14,389 100.0% 14,389 100.0% 0.0%

CONTAINS_OP

specialization stats for CONTAINS_OP family
Kind Base Count Base Ratio Head Count Head Ratio Change
deferred

Lists the number of "deferred" (i.e. not specialized) instructions executed.

1,566,410 54.5% 1,566,390 54.5% -0.0%
hit

Specialized instructions that complete.

1,306,119 45.5% 1,306,119 45.5% 0.0%
Success Base Count Base Ratio Head Count Head Ratio Change
Success 8 0.9% 8 0.9% 0.0%
Failure 870 99.1% 870 99.1% 0.0%
Failure kind Base Count Base Ratio Head Count Head Ratio Change
str 671 77.1% 671 77.1% 0.0%
list 103 11.8% 103 11.8% 0.0%
tuple 96 11.0% 96 11.0% 0.0%

FOR_ITER

specialization stats for FOR_ITER family
Kind Base Count Base Ratio Head Count Head Ratio Change
hit

Specialized instructions that complete.

4,112,293 84.3% 4,432,695 85.3% 7.8%
deferred

Lists the number of "deferred" (i.e. not specialized) instructions executed.

765,573 15.7% 765,573 14.7% 0.0%
miss

Specialized instructions that deopt.

16 0.0% 16 0.0% 0.0%
Success Base Count Base Ratio Head Count Head Ratio Change
Success 9 2.7% 9 2.7% 0.0%
Failure 329 97.3% 329 97.3% 0.0%
Failure kind Base Count Base Ratio Head Count Head Ratio Change
dict keys 184 55.9% 184 55.9% 0.0%
enumerate 60 18.2% 60 18.2% 0.0%
zip 52 15.8% 52 15.8% 0.0%
dict items 31 9.4% 31 9.4% 0.0%
dict values 2 0.6% 2 0.6% 0.0%

LOAD_ATTR

specialization stats for LOAD_ATTR family
Kind Base Count Base Ratio Head Count Head Ratio Change
hit

Specialized instructions that complete.

25,843,755 81.4% 26,057,356 81.5% 0.8%
deferred

Lists the number of "deferred" (i.e. not specialized) instructions executed.

748,208 2.4% 748,208 2.3% 0.0%
miss

Specialized instructions that deopt.

5,154,646 16.2% 5,154,646 16.1% 0.0%
Success Base Count Base Ratio Head Count Head Ratio Change
Success 97,608 99.6% 97,608 99.6% 0.0%
Failure 441 0.4% 441 0.4% 0.0%
Failure kind Base Count Base Ratio Head Count Head Ratio Change
method 394 89.3% 394 89.3% 0.0%
mutable class 47 10.7% 47 10.7% 0.0%

LOAD_GLOBAL

specialization stats for LOAD_GLOBAL family
Kind Base Count Base Ratio Head Count Head Ratio Change
hit

Specialized instructions that complete.

21,092,960 100.0% 21,306,561 100.0% 1.0%
deferred

Lists the number of "deferred" (i.e. not specialized) instructions executed.

26 0.0% 26 0.0% 0.0%
deopt

Specialized instructions that deopt.

38 0.0% 38 0.0% 0.0%
miss

Specialized instructions that deopt.

38 0.0% 38 0.0% 0.0%
Success Base Count Base Ratio Head Count Head Ratio Change
Success 169 100.0% 169 100.0% 0.0%
Failure 0 0.0% 0 0.0%

LOAD_METHOD

specialization stats for LOAD_METHOD family
Kind Base Count Base Ratio Head Count Head Ratio Change
deferred

Lists the number of "deferred" (i.e. not specialized) instructions executed.

1,544,800 53.0% 1,544,781 53.0% -0.0%
miss

Specialized instructions that deopt.

1,368,706 47.0% 1,368,706 47.0% 0.0%
Success Base Count Base Ratio Head Count Head Ratio Change
Success 25,904 97.4% 25,904 97.4% 0.0%
Failure 693 2.6% 693 2.6% 0.0%
Failure kind Base Count Base Ratio Head Count Head Ratio Change
other 479 69.1% 479 69.1% 0.0%
overridden 49 7.1% 49 7.1% 0.0%
kind 18 47 6.8% 47 6.8% 0.0%

LOAD_SUPER_ATTR

specialization stats for LOAD_SUPER_ATTR family
Kind Base Count Base Ratio Head Count Head Ratio Change
hit

Specialized instructions that complete.

590,647 100.0% 590,647 100.0% 0.0%
Success Base Count Base Ratio Head Count Head Ratio Change
Success 1 100.0% 1 100.0% 0.0%
Failure 0 0.0% 0 0.0%

LOAD_SUPER_METHOD

specialization stats for LOAD_SUPER_METHOD family
Kind Base Count Base Ratio Head Count Head Ratio Change
deferred

Lists the number of "deferred" (i.e. not specialized) instructions executed.

2 33.3% 2 33.3% 0.0%
Success Base Count Base Ratio Head Count Head Ratio Change
Success 4 100.0% 4 100.0% 0.0%
Failure 0 0.0% 0 0.0%

STORE_ATTR

specialization stats for STORE_ATTR family
Kind Base Count Base Ratio Head Count Head Ratio Change
deferred

Lists the number of "deferred" (i.e. not specialized) instructions executed.

7 0.0% 7 0.0% 0.0%
hit

Specialized instructions that complete.

4,437,830 62.9% 4,437,830 62.9% 0.0%
miss

Specialized instructions that deopt.

2,616,203 37.1% 2,616,203 37.1% 0.0%
Success Base Count Base Ratio Head Count Head Ratio Change
Success 49,367 100.0% 49,367 100.0% 0.0%
Failure 0 0.0% 0 0.0%

STORE_SUBSCR

specialization stats for STORE_SUBSCR family
Kind Base Count Base Ratio Head Count Head Ratio Change
deferred

Lists the number of "deferred" (i.e. not specialized) instructions executed.

108,163 5.2% 108,163 5.2% 0.0%
hit

Specialized instructions that complete.

1,979,933 94.8% 1,979,933 94.8% 0.0%
Success Base Count Base Ratio Head Count Head Ratio Change
Success 4 7.1% 4 7.1% 0.0%
Failure 52 92.9% 52 92.9% 0.0%
Failure kind Base Count Base Ratio Head Count Head Ratio Change
list slice 52 100.0% 52 100.0% 0.0%

TO_BOOL

specialization stats for TO_BOOL family
Kind Base Count Base Ratio Head Count Head Ratio Change
deferred

Lists the number of "deferred" (i.e. not specialized) instructions executed.

241,351 2.2% 241,351 2.2% 0.0%
hit

Specialized instructions that complete.

10,642,415 96.2% 10,642,415 96.2% 0.0%
miss

Specialized instructions that deopt.

180,101 1.6% 180,101 1.6% 0.0%
Success Base Count Base Ratio Head Count Head Ratio Change
Success 3,446 94.1% 3,446 94.1% 0.0%
Failure 217 5.9% 217 5.9% 0.0%
Failure kind Base Count Base Ratio Head Count Head Ratio Change
tuple 145 66.8% 145 66.8% 0.0%
dict 51 23.5% 51 23.5% 0.0%
sequence 21 9.7% 21 9.7% 0.0%

UNPACK_SEQUENCE

specialization stats for UNPACK_SEQUENCE family
Kind Base Count Base Ratio Head Count Head Ratio Change
deferred

Lists the number of "deferred" (i.e. not specialized) instructions executed.

6 0.0% 6 0.0% 0.0%
hit

Specialized instructions that complete.

1,164,801 100.0% 1,164,801 100.0% 0.0%
Success Base Count Base Ratio Head Count Head Ratio Change
Success 30 100.0% 30 100.0% 0.0%
Failure 0 0.0% 0 0.0%

Specialization effectiveness

specialization effectiveness

All entries are execution counts. Should add up to the total number of Tier 1 instructions executed.

Instructions Base Count Base Ratio Head Count Head Ratio Change
Specialized hits

Specialized instructions, e.g. LOAD_ATTR_MODULE that complete.

131,737,179 37.3% 136,927,407 38.1% 3.9%
Basic

Instructions that are not and cannot be specialized, e.g. LOAD_FAST.

203,623,908 57.7% 204,575,524 57.0% 0.5%
Not specialized

Instructions that could be specialized but aren't, e.g. LOAD_ATTR, BINARY_SLICE.

7,946,999 2.3% 7,946,960 2.2% -0.0%
Specialized misses

Specialized instructions, e.g. LOAD_ATTR_MODULE that deopt.

9,672,229 2.7% 9,672,190 2.7% -0.0%

Deferred by instruction

Breakdown of deferred (not specialized) instruction counts by family
Name Base Count Base Ratio Head Count Head Ratio Change
CONTAINS_OP 1,566,410 19.8% 1,566,390 19.8% -0.0%
LOAD_METHOD 1,544,800 19.5% 1,544,781 19.5% -0.0%
BINARY_OP 1,470,561 18.6% 1,470,561 18.6% 0.0%
BINARY_SLICE 939,683 11.9% 939,683 11.9% 0.0%
FOR_ITER 765,573 9.7% 765,573 9.7% 0.0%
LOAD_ATTR 748,208 9.4% 748,208 9.4% 0.0%
COMPARE_OP 357,168 4.5% 357,168 4.5% 0.0%
TO_BOOL 241,351 3.0% 241,351 3.0% 0.0%
BINARY_SUBSCR 183,038 2.3% 183,038 2.3% 0.0%
STORE_SUBSCR 108,163 1.4% 108,163 1.4% 0.0%

Misses by instruction

Breakdown of misses (specialized deopts) instruction counts by family
Name Base Count Base Ratio Head Count Head Ratio Change
LOAD_ATTR_INSTANCE_VALUE 5,154,646 53.3% 5,154,646 53.3% 0.0%
STORE_ATTR_INSTANCE_VALUE 2,616,203 27.0% 2,616,203 27.0% 0.0%
LOAD_METHOD_WITH_VALUES 1,368,706 14.2% 1,368,706 14.2% 0.0%
COMPARE_OP_STR 253,585 2.6% 253,585 2.6% 0.0%
CALL_PY_EXACT_ARGS 90,878 0.9% 90,878 0.9% 0.0%
TO_BOOL_STR 90,351 0.9% 90,351 0.9% 0.0%
TO_BOOL_NONE 89,744 0.9% 89,744 0.9% 0.0%
CALL_BUILTIN_CLASS 8,003 0.1% 8,003 0.1% 0.0%
RESUME 43 0.0%
RESUME_CHECK 43 0.0%
LOAD_GLOBAL_BUILTIN 38 0.0%
FOR_ITER_LIST 16 0.0%

Call stats

Inlined calls and frame stats

This shows what fraction of calls to Python functions are inlined (i.e. not having a call at the C level) and for those that are not, where the call comes from. The various categories overlap.

Also includes the count of frame objects created.

Base Count Base Ratio Head Count Head Ratio Change
Calls to PyEval_EvalDefault 1,006,711 8.3% 1,006,711 8.3% 0.0%
Calls to Python functions inlined 11,064,836 91.7% 11,064,836 91.7% 0.0%
Calls via PyEval_EvalFrame (total) 1,006,711 8.3% 1,006,711 8.3% 0.0%
Calls via PyEval_EvalFrame (vector) 1,006,711 8.3% 1,006,711 8.3% 0.0%
Calls via PyEval_EvalFrame (generator) 0 0.0% 0 0.0%
Calls via PyEval_EvalFrame (legacy) 0 0.0% 0 0.0%
Calls via PyEval_EvalFrame (function vectorcall) 1,006,711 8.3% 1,006,711 8.3% 0.0%
Calls via PyEval_EvalFrame (build class) 0 0.0% 0 0.0%
Calls via PyEval_EvalFrame (slot) 38 0.0% 38 0.0% 0.0%
Calls via PyEval_EvalFrame (function ex) 0 0.0% 0 0.0%
Calls via PyEval_EvalFrame (api) 0 0.0% 0 0.0%
Calls via PyEval_EvalFrame (method) 0 0.0% 0 0.0%
Frame objects created 1,422,565 11.8% 1,422,565 11.8% 0.0%
Frames pushed 12,246,257 101.4% 12,246,257 101.4% 0.0%

Object stats

Allocations, frees and dict materializatons

Below, "allocations" means "allocations that are not from a freelist". Total allocations = "Allocations from freelist" + "Allocations".

"Inline values" is the number of values arrays inlined into objects.

The cache hit/miss numbers are for the MRO cache, split into dunder and other names.

Base Count Base Ratio Head Count Head Ratio Change
Method cache misses 605,670 468,863 -22.6%
Method cache collisions 622,696 482,261 -22.6%
Method cache dunder misses 22,798 19,085 -16.3%
Mortal decrefs 75,218,105 20.3% 72,784,672 19.6% -3.2%
Mortal increfs 74,126,565 23.4% 72,119,864 22.7% -2.7%
Interpreter immortal increfs 46,651,127 14.7% 47,719,051 15.1% 2.3%
Immortal decrefs 65,214,335 17.6% 63,787,881 17.2% -2.2%
Immortal increfs 63,459,562 20.0% 62,247,262 19.6% -1.9%
Interpreter immortal decrefs 67,134,881 18.1% 68,309,585 18.4% 1.7%
Interpreter mortal decrefs 163,495,119 44.1% 165,765,140 44.7% 1.4%
Interpreter mortal increfs 133,123,893 41.9% 134,966,675 42.6% 1.4%
Method cache hits 13,637,683 13,774,490 1.0%
Method cache dunder hits 2,506,277 2,509,990 0.1%
Frees 21,072,885 21,073,188 0.0%
Allocations to 4 kbytes 133,646 0.4% 133,645 0.4% -0.0%
Frees to freelist 16,123,257 16,123,236 -0.0%
Allocations from freelist 16,123,402 45.1% 16,123,381 45.1% -0.0%
Allocations 19,618,207 54.9% 19,618,206 54.9% -0.0%
Allocations to 512 bytes 19,484,517 54.5% 19,484,517 54.5% 0.0%
Allocations over 4 kbytes 44 0.0% 44 0.0% 0.0%
Inline values 673,851 673,851 0.0%
Materialize dict (on request) 0 0.0% 0 0.0%
Materialize dict (new key) 83,190 12.3% 83,190 12.3% 0.0%
Materialize dict (too big) 0 0.0% 0 0.0%
Materialize dict (str subclass) 0 0.0% 0 0.0%

GC stats

GC collections and effectiveness

Collected/visits gives some measure of efficiency.

Generation Base Collections Base Objects collected Base Object visits Base Reachable from roots Base Not reachable from roots Head Collections Head Objects collected Head Object visits Head Reachable from roots Head Not reachable from roots
0 0 0 0 0 0 0 0 0 0 0
1 693 1,402,007 17,610,191 124,226 1,404,143 693 1,402,007 17,610,278 124,244 1,404,121
2 0 0 0 0 0 0 0 0 0 0

Optimization (Tier 2) stats

statistics about the Tier 2 optimizer
Base Count Base Ratio Head Count Head Ratio Change
Uops executed

The total number of uops (micro-operations) that were executed

94,424,250 2,260.8% 82,754,006 2,047.1% -12.4%
Trace stack underflow

A potential trace is abandoned because it pops more frames than it pushes.

282 30.4% 261 28.8% -7.4%
Traces executed

The number of traces that were executed

4,176,509 4,042,422 -3.2%
Traces created

The number of traces that were successfully created.

818 88.1% 796 87.8% -2.7%
Optimization attempts

The number of times a potential trace is identified. Specifically, this occurs in the JUMP BACKWARD instruction when the counter reaches a threshold.

929 907 -2.4%
Trace stack overflow

A trace is truncated because it would require more than 5 stack frames.

0 0.0% 0 0.0%
Trace too long

A trace is truncated because it is longer than the instruction buffer.

0 0.0% 0 0.0%
Trace too short

A potential trace is abandoned because it it too short.

111 11.9% 111 12.2% 0.0%
Inner loop found

A trace is truncated because it has an inner loop

43 4.6% 43 4.7% 0.0%
Recursive call

A trace is truncated because it has a recursive call.

0 0.0% 0 0.0%
Low confidence

A trace is abandoned because the likelihood of the jump to top being taken is too low.

64 6.9% 64 7.1% 0.0%
Executors invalidated

The number of executors that were invalidated due to watched dictionary changes.

0 0.0% 0 0.0%
Base Count Base Ratio Head Count Head Ratio Change
Optimizer successes

The number of traces that were successfully optimized.

651 79.6% 629 79.0% -3.4%
Optimizer attempts

The number of times the trace optimizer (_Py_uop_analyze_and_optimize) was run.

818 796 -2.7%
Optimizer no memory

The number of optimizations that failed due to no memory.

0 0.0% 0 0.0%
Remove globals builtins changed

The builtins changed during optimization

0 0.0% 0 0.0%
Remove globals incorrect keys

The keys in the globals dictionary aren't what was expected

0 0.0% 0 0.0%

Trace length histogram

trace length histogram
Range Base Count Base Ratio Head Count Head Ratio Change
<= 1 0 0.0% 0 0.0%
<= 2 0 0.0% 0 0.0%
<= 4 0 0.0% 0 0.0%
<= 8 64 7.8% 43 5.4% -32.8%
<= 16 86 10.5% 86 10.8% 0.0%
<= 32 279 34.1% 279 35.1% 0.0%
<= 64 129 15.8% 129 16.2% 0.0%
<= 128 217 26.5% 216 27.1% -0.5%
<= 256 43 5.3% 43 5.4% 0.0%

Optimized trace length histogram

optimized trace length histogram
Range Base Count Base Ratio Head Count Head Ratio Change
<= 1 0 0.0% 0 0.0%
<= 2 0 0.0% 0 0.0%
<= 4 22 2.7% 22 2.8% 0.0%
<= 8 107 13.1% 86 10.8% -19.6%
<= 16 42 5.1% 42 5.3% 0.0%
<= 32 364 44.5% 364 45.7% 0.0%
<= 64 70 8.6% 69 8.7% -1.4%
<= 128 25 3.1% 25 3.1% 0.0%
<= 256 21 2.6% 21 2.6% 0.0%

Trace run length histogram

trace run length histogram
Range Base Count Base Ratio Head Count Head Ratio Change
<= 1 0 0.0% 0 0.0%

Uop execution stats

uop execution stats
Name Base Count Head Count Change
_DEOPT 41 2 -95.1%
_CALL_BUILTIN_FAST_WITH_KEYWORDS 226,109 12,508 -94.5%
_BINARY_OP_INPLACE_ADD_UNICODE 240,431 26,830 -88.8%
_LOAD_FAST_3 832,828 164,739 -80.2%
_LOAD_FAST_2 846,418 205,615 -75.7%
_CALL_METHOD_DESCRIPTOR_FAST 628,517 201,315 -68.0%
_STORE_FAST_4 762,602 335,400 -56.0%
_LOAD_FAST_4 1,171,825 531,022 -54.7%
_TO_BOOL_STR 424,899 211,318 -50.3%
_GUARD_NOT_EXHAUSTED_TUPLE 708,203 387,801 -45.2%
_ITER_CHECK_TUPLE 708,203 387,801 -45.2%
_TO_BOOL_BOOL 963,878 536,676 -44.3%
_ITER_NEXT_TUPLE 533,956 320,355 -40.0%
_GUARD_BOTH_UNICODE 556,596 342,995 -38.4%
_JUMP_TO_TOP 634,466 420,865 -33.7%
_PUSH_NULL 707,392 493,791 -30.2%
_LOAD_METHOD_NO_DICT 1,430,718 1,003,516 -29.9%
_GUARD_IS_FALSE_POP 1,437,323 1,010,121 -29.7%
_CHECK_PERIODIC 4,550,430 3,589,225 -21.1%
_CHECK_FUNCTION 1,023,928 810,327 -20.9%
_LOAD_CONST_INLINE 1,281,895 1,068,294 -16.7%
_GUARD_IS_TRUE_POP 1,286,516 1,072,955 -16.6%
_CHECK_VALIDITY_AND_SET_IP 1,495,351 1,281,750 -14.3%
_GUARD_TYPE_VERSION 3,067,316 2,640,153 -13.9%
_CHECK_VALIDITY 9,064,590 7,889,843 -13.0%
_SET_IP 11,059,018 9,884,290 -10.6%
_MAKE_WARM 4,810,975 4,463,287 -7.2%
_POP_TOP 538,277 510,991 -5.1%
_EXIT_TRACE 2,713,015 2,578,948 -4.9%
_START_EXECUTOR 4,176,509 4,042,422 -3.2%
_BINARY_SUBSCR_STR_INT 210,961 210,981 0.0%
_LOAD_SMALL_INT_0 310,827 310,847 0.0%
_CHECK_MANAGED_OBJECT_HAS_VALUES 830,426 830,465 0.0%
_LOAD_ATTR_INSTANCE_VALUE 830,426 830,465 0.0%
_LOAD_METHOD 535,090 535,109 0.0%
_CONTAINS_OP 604,889 604,909 0.0%
_LOAD_FAST_1 2,242,706 2,242,765 0.0%
_CHECK_STACK_SPACE 806,479 806,498 0.0%
_LOAD_FAST_0 2,578,967 2,579,025 0.0%
_INIT_CALL_PY_EXACT_ARGS_1 864,090 864,109 0.0%
_CHECK_FUNCTION_EXACT_ARGS 893,045 893,064 0.0%
_CHECK_FUNCTION_VERSION 1,225,908 1,225,927 0.0%
_SAVE_RETURN_OFFSET 1,336,898 1,336,917 0.0%
_LOAD_CONST_INLINE_BORROW 1,511,510 1,511,530 0.0%
_DYNAMIC_EXIT 1,463,453 1,463,472 0.0%
_PUSH_FRAME 1,673,517 1,673,536 0.0%
_LOAD_FAST 1,720,301 1,720,301 0.0%
_GUARD_NOT_EXHAUSTED_LIST 1,339,782 1,339,782 0.0%
_ITER_CHECK_LIST 1,339,782 1,339,782 0.0%
_TIER2_RESUME_CHECK 1,014,045 1,014,045 0.0%
_ITER_NEXT_LIST 708,565 708,565 0.0%
_GUARD_DORV_VALUES_INST_ATTR_FROM_DICT 702,369 702,369 0.0%
_GUARD_KEYS_VERSION 702,369 702,369 0.0%
_LOAD_METHOD_WITH_VALUES 702,369 702,369 0.0%
_STORE_FAST 650,456 650,456 0.0%
_FOR_ITER_TIER_TWO 632,101 632,101 0.0%
_LOAD_DEREF 612,011 612,011 0.0%
_STORE_FAST_1 595,376 595,376 0.0%
_RESUME_CHECK 548,189 548,189 0.0%
_BINARY_OP 359,693 359,693 0.0%
_TO_BOOL_INT 347,185 347,185 0.0%
_COPY_FREE_VARS 338,717 338,717 0.0%
_CALL_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS 338,462 338,462 0.0%
_CALL_ISINSTANCE 338,125 338,125 0.0%
_BINARY_SUBSCR_CHECK_FUNC 336,619 336,619 0.0%
_BINARY_SUBSCR_INIT_CALL 336,619 336,619 0.0%
_PY_FRAME_GENERAL 332,863 332,863 0.0%
_GUARD_NOT_EXHAUSTED_RANGE 320,355 320,355 0.0%
_ITER_CHECK_RANGE 320,355 320,355 0.0%
_COMPARE_OP_STR 316,165 316,165 0.0%
_UNPACK_SEQUENCE_TWO_TUPLE 289,097 289,097 0.0%
_LOAD_FAST_5 282,253 282,253 0.0%
_LOAD_FAST_6 277,607 277,607 0.0%
_STORE_FAST_6 264,558 264,558 0.0%
_CALL_METHOD_DESCRIPTOR_NOARGS 238,137 238,137 0.0%
_BINARY_OP_ADD_UNICODE 213,601
_LOAD_FAST_7 212,951 212,951 0.0%
_STORE_FAST_7 200,443 200,443 0.0%
_STORE_FAST_2 164,287 164,287 0.0%
_CALL_LIST_APPEND 125,312 125,312 0.0%
_STORE_FAST_5 121,623 121,623 0.0%
_CHECK_FUNCTION_VERSION_INLINE 110,990 110,990 0.0%
_INIT_CALL_PY_EXACT_ARGS_2 109,136 109,136 0.0%
_UNARY_INVERT 106,785 106,785 0.0%
_ITER_NEXT_RANGE 106,785 106,785 0.0%
_CHECK_STACK_SPACE_OPERAND 99,074 99,074 0.0%
_IMPORT_NAME 98,482 98,482 0.0%
_CALL_METHOD_DESCRIPTOR_O 67,552 67,552 0.0%
_BINARY_SLICE 66,924 66,924 0.0%
_BUILD_LIST 47,166 47,166 0.0%
_STORE_FAST_3 45,109 45,109 0.0%
_CONTAINS_OP_DICT 34,900 34,900 0.0%
_LOAD_SMALL_INT_1 34,350 34,350 0.0%
_BINARY_OP_ADD_INT 33,758 33,758 0.0%
_GUARD_NOS_INT 33,758 33,758 0.0%
_TO_BOOL_NONE 32,283 32,283 0.0%
_CALL_NON_PY_GENERAL 32,283 32,283 0.0%
_CHECK_IS_NOT_PY_CALLABLE 32,283 32,283 0.0%
_STORE_SUBSCR_DICT 32,030 32,030 0.0%
_INIT_CALL_PY_EXACT_ARGS_3 29,589 29,589 0.0%
_CALL_BUILTIN_FAST 26,395 26,395 0.0%
_TO_BOOL_LIST 21,938 21,938 0.0%
_GET_ITER 12,761 12,761 0.0%
_STORE_FAST_0 12,508 12,508 0.0%
_POP_TOP_LOAD_CONST_INLINE_BORROW 12,487 12,487 0.0%
_CONTAINS_OP_SET 6,614 6,614 0.0%
_STORE_DEREF 6,100 6,100 0.0%
_SET_FUNCTION_ATTRIBUTE 3,660 3,660 0.0%
_CALL_BUILTIN_CLASS 3,660 3,660 0.0%
_BUILD_TUPLE 3,340 3,340 0.0%
_COMPARE_OP_INT 2,981 2,981 0.0%
_MAKE_FUNCTION 2,440 2,440 0.0%
_BINARY_SUBSCR_DICT 1,492 1,492 0.0%
_BINARY_SUBSCR_LIST_INT 1,384 1,384 0.0%
_GUARD_IS_NONE_POP 1,384 1,384 0.0%
_INIT_CALL_PY_EXACT_ARGS_0 1,220 1,220 0.0%
_GUARD_BOTH_INT 1,205 1,205 0.0%
_SWAP 669 669 0.0%
_CALL_LEN 592 592 0.0%
_UNPACK_SEQUENCE_TUPLE 592 592 0.0%
_CHECK_CALL_BOUND_METHOD_EXACT_ARGS 592 592 0.0%
_GUARD_IS_NOT_NONE_POP 592 592 0.0%
_INIT_CALL_BOUND_METHOD_EXACT_ARGS 592 592 0.0%
_LOAD_ATTR 592 592 0.0%
_IS_OP 390 390 0.0%
_CALL_KW_NON_PY 337 337 0.0%
_CHECK_IS_NOT_PY_CALLABLE_KW 337 337 0.0%

Pair counts

Pair counts for top 100 Non-JIT uop pairs

Pairs of specialized operations that deoptimize and are then followed by the corresponding unspecialized instruction are not counted as pairs.

Not included in comparative output.

Unsupported opcodes

unsupported opcodes

Optimizer errored out with opcode

Optimization stopped after encountering this opcode

Rare events

Counts of rare/unlikely events
Event Base Count Head Count Change
set class

Setting an object's class, obj.__class__ = ...

0 0
set bases

Setting the bases of a class, cls.__bases__ = ...

0 0
set eval frame func

Setting the PEP 523 frame eval function _PyInterpreterState_SetFrameEvalFunc()

0 0
builtin dict

Modifying the builtins, __builtins__.__dict__[var] = ...

0 0
func modification

Modifying a function, e.g. func.__defaults__ = ..., etc.

0 0
watched dict modification

A watched dict has been modified

0 0
watched globals modification

A watched globals() dict has been modified

0 0

Meta stats

Meta statistics
Base Count Head Count Change
Number of data files 21 21 0.0%

Stats gathered on: 2025-01-22