Skip to content

Latest commit

 

History

History
5048 lines (4770 loc) · 105 KB

bm-20241025-azure-x86_64-brandtbucher-justin_no_externs-3.14.0a1+-5791853-pystats-concurrent_imap-vs-base.md

File metadata and controls

5048 lines (4770 loc) · 105 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
BINARY_OP_SUBTRACT_FLOAT 306,027 421,023 37.6%
CONTAINS_OP_DICT 630,265 860,631 36.6%
TO_BOOL_LIST 633,030 863,035 36.3%
TO_BOOL_INT 2,142,539 2,909,224 35.8%
LIST_EXTEND 214,976 291,648 35.7%
LOAD_SUPER_ATTR_METHOD 865,098 1,171,788 35.5%
LIST_APPEND 327,133 442,136 35.2%
CALL_METHOD_DESCRIPTOR_FAST 658,792 889,016 34.9%
BINARY_OP 2,869,059 3,865,965 34.7%
COPY_FREE_VARS 893,335 1,200,025 34.3%
CALL_ISINSTANCE 447,599 600,944 34.3%
COMPARE_OP 347,139 462,156 33.1%
LOAD_DEREF 931,148 1,237,838 32.9%
IMPORT_FROM 233,624 310,284 32.8%
BUILD_LIST 700,995 931,011 32.8%
IMPORT_NAME 233,686 310,346 32.8%
UNARY_INVERT 467,851 621,193 32.8%
LOAD_FAST_AND_CLEAR 356,375 471,409 32.3%
FOR_ITER_LIST 717,415 947,465 32.1%
JUMP_FORWARD 600,336 792,338 32.0%
LOAD_ATTR_NONDESCRIPTOR_WITH_VALUES 731,349 961,345 31.4%
GET_ITER 992,726 1,299,431 30.9%
UNARY_NOT 124,387 162,736 30.8%
BUILD_MAP 519,513 672,858 29.5%
CALL_KW_PY 133,554 171,890 28.7%
POP_JUMP_IF_NOT_NONE 1,492,283 1,913,924 28.3%
CALL_NON_PY_GENERAL 3,955,252 5,028,704 27.1%
CALL_BOUND_METHOD_GENERAL 143,626 181,975 26.7%
LOAD_ATTR_METHOD_WITH_VALUES 3,035,085 3,840,543 26.5%
LOAD_GLOBAL_MODULE 7,833,015 9,903,119 26.4%
LOAD_FAST_LOAD_FAST 5,668,789 7,163,402 26.4%
CALL_PY_EXACT_ARGS 5,173,156 6,515,103 25.9%
STORE_ATTR_INSTANCE_VALUE 2,928,658 3,657,713 24.9%
LOAD_ATTR_MODULE 1,398,908 1,743,982 24.7%
POP_JUMP_IF_TRUE 1,256,501 1,563,496 24.4%
LOAD_ATTR 3,927,568 4,886,045 24.4%
RETURN_CONST 4,329,605 5,365,278 23.9%
LOAD_ATTR_PROPERTY 164,181 202,509 23.3%
POP_JUMP_IF_FALSE 7,119,939 8,769,262 23.2%
SWAP 3,178,208 3,868,902 21.7%
LOAD_GLOBAL_BUILTIN 3,419,902 4,148,288 21.3%
STORE_SUBSCR_DICT 1,113,167 1,342,715 20.6%
LOAD_FAST 42,464,026 50,824,282 19.7%
TO_BOOL_BOOL 2,251,651 2,673,961 18.8%
LOAD_ATTR_METHOD_NO_DICT 1,942,518 2,288,153 17.8%
CALL_PY_GENERAL 2,172,010 2,555,793 17.7%
POP_TOP 9,217,218 10,789,619 17.1%
RESUME_CHECK 14,833,983 17,288,447 16.5%
BUILD_TUPLE 1,681,642 1,949,968 16.0%
RETURN_VALUE 13,274,976 15,383,379 15.9%
LOAD_FAST_CHECK 740,836 855,845 15.5%
LOAD_SPECIAL 2,039,942 2,346,658 15.0%
NOP 2,955,216 3,376,496 14.3%
LOAD_ATTR_INSTANCE_VALUE 9,723,940 11,106,910 14.2%
COMPARE_OP_INT 1,764,904 1,994,815 13.0%
CALL_METHOD_DESCRIPTOR_NOARGS 888,152 1,002,922 12.9%
STORE_FAST 13,934,217 15,621,269 12.1%
LOAD_CONST 8,612,708 9,648,396 12.0%
COPY 5,353,228 5,967,272 11.5%
CALL_BUILTIN_CLASS 698,757 775,465 11.0%
INTERPRETER_EXIT 7,116,207 7,767,877 9.2%
CALL_BUILTIN_FAST 425,088 463,462 9.0%
ENTER_EXECUTOR 8,056,307 8,632,866 7.2%
UNPACK_SEQUENCE_TWO_TUPLE 581,145 619,491 6.6%
PUSH_NULL 2,953,629 3,145,379 6.5%
STORE_FAST_STORE_FAST 1,446,388 1,484,734 2.7%
JUMP_BACKWARD_NO_INTERRUPT 4,852 4,770 -1.7%
TO_BOOL_ALWAYS_TRUE 97 98 1.0%
TO_BOOL 66,564 67,057 0.7%
CALL 4,556 4,527 -0.6%
CHECK_EXC_MATCH 13,251 13,168 -0.6%
LOAD_GLOBAL 3,161 3,143 -0.6%
POP_EXCEPT 17,474 17,391 -0.5%
PUSH_EXC_INFO 17,474 17,391 -0.5%
RESUME 474 472 -0.4%
CALL_METHOD_DESCRIPTOR_O 184,617 185,175 0.3%
BINARY_SUBSCR 36,621 36,541 -0.2%
BINARY_OP_ADD_INT 443,390 444,086 0.2%
BINARY_OP_ADD_FLOAT 20,709 20,729 0.1%
BINARY_OP_SUBTRACT_INT 94,456 94,400 -0.1%
JUMP_BACKWARD 44,047 44,073 0.1%
LOAD_ATTR_METHOD_LAZY_DICT 89,325 89,375 0.1%
STORE_SUBSCR 21,483 21,471 -0.1%
UNPACK_SEQUENCE_TUPLE 37,962 37,975 0.0%
STORE_ATTR 61,385 61,373 -0.0%
LOAD_ATTR_CLASS 57,480 57,491 0.0%
POP_JUMP_IF_NONE 300,249 300,306 0.0%
CALL_LEN 149,271 149,295 0.0%
STORE_FAST_LOAD_FAST 26,017 26,021 0.0%
FOR_ITER 22,089 22,092 0.0%
CALL_BOUND_METHOD_EXACT_ARGS 28,687 28,685 -0.0%
CALL_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS 39,010 39,012 0.0%
TO_BOOL_NONE 146,982 146,975 -0.0%
CALL_BUILTIN_FAST_WITH_KEYWORDS 892,597 892,634 0.0%
IS_OP 34,037 34,038 0.0%
CALL_FUNCTION_EX 1,818,649 1,818,662 0.0%
COMPARE_OP_STR 489,419 489,418 -0.0%
YIELD_VALUE 5,067,766 5,067,766 0.0%
MAKE_CELL 105,137 105,137 0.0%
STORE_DEREF 105,107 105,107 0.0%
BINARY_SUBSCR_DICT 84,693 84,693 0.0%
CALL_KW_NON_PY 77,098 77,098 0.0%
DELETE_SUBSCR 67,585 67,585 0.0%
DELETE_ATTR 63,345 63,345 0.0%
CALL_ALLOC_AND_ENTER_INIT 55,468 55,468 0.0%
EXIT_INIT_CHECK 55,466 55,466 0.0%
DICT_MERGE 50,952 50,952 0.0%
BINARY_SUBSCR_TUPLE_INT 43,864 43,864 0.0%
MAKE_FUNCTION 42,873 42,873 0.0%
FORMAT_SIMPLE 38,409 38,409 0.0%
CALL_LIST_APPEND 29,975 29,975 0.0%
BUILD_STRING 29,697 29,697 0.0%
SET_FUNCTION_ATTRIBUTE 29,547 29,547 0.0%
LOAD_ATTR_SLOT 28,763 28,763 0.0%
STORE_ATTR_SLOT 28,680 28,680 0.0%
CALL_BUILTIN_O 26,276 26,276 0.0%
LOAD_SUPER_ATTR_ATTR 23,800 23,800 0.0%
FOR_ITER_RANGE 21,679 21,679 0.0%
BINARY_OP_INPLACE_ADD_UNICODE 20,988 20,988 0.0%
CONVERT_VALUE 17,404 17,404 0.0%
BINARY_SLICE 12,855 12,855 0.0%
RETURN_GENERATOR 12,831 12,831 0.0%
BINARY_SUBSCR_LIST_INT 12,728 12,728 0.0%
RERAISE 12,672 12,672 0.0%
FOR_ITER_TUPLE 9,142 9,142 0.0%
BINARY_OP_MULTIPLY_FLOAT 8,731 8,731 0.0%
BINARY_SUBSCR_STR_INT 8,731 8,731 0.0%
FOR_ITER_GEN 8,502 8,502 0.0%
CALL_STR_1 8,485 8,485 0.0%
END_FOR 8,446 8,446 0.0%
CALL_TUPLE_1 4,396 4,396 0.0%
RAISE_VARARGS 4,227 4,227 0.0%
WITH_EXCEPT_START 4,223 4,223 0.0%
STORE_NAME 742 742 0.0%
BINARY_OP_ADD_UNICODE 368 368 0.0%
LOAD_NAME 195 195 0.0%
CALL_KW 179 179 0.0%
CALL_TYPE_1 152 152 0.0%
UNPACK_SEQUENCE 148 148 0.0%
TO_BOOL_STR 139 139 0.0%
EXTENDED_ARG 129 129 0.0%
CONTAINS_OP_SET 93 93 0.0%
LOAD_SUPER_ATTR 68 68 0.0%
LOAD_BUILD_CLASS 41 41 0.0%
LOAD_LOCALS 37 37 0.0%
COMPARE_OP_FLOAT 15 15 0.0%
CONTAINS_OP 14 14 0.0%
CALL_INTRINSIC_1 14 14 0.0%
LOAD_ATTR_CLASS_WITH_METACLASS_CHECK 12 12 0.0%
STORE_GLOBAL 4 4 0.0%
BINARY_SUBSCR_GETITEM 3 3 0.0%
BUILD_SET 1 1 0.0%
MAP_ADD 1 1 0.0%

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.

2,867,236 67.6% 3,863,915 72.2% 34.8%
hit

Specialized instructions that complete.

1,373,986 32.4% 1,488,952 27.8% 8.4%
Success Base Count Base Ratio Head Count Head Ratio Change
Failure 1,699 93.2% 1,932 94.2% 13.7%
Success 124 6.8% 118 5.8% -4.8%
Failure kind Base Count Base Ratio Head Count Head Ratio Change
or 443 26.1% 533 27.6% 20.3%
and int 770 45.3% 914 47.3% 18.7%
remainder 208 12.2% 207 10.7% -0.5%
add different types 191 11.2% 191 9.9% 0.0%
add other 87 5.1% 87 4.5% 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.

12,855 100.0% 12,855 100.0% 0.0%

BINARY_SUBSCR

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

Specialized instructions that complete.

421,496 92.0% 498,168 93.2% 18.2%
deferred

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

36,326 7.9% 36,244 6.8% -0.2%
Success Base Count Base Ratio Head Count Head Ratio Change
Failure 178 60.3% 180 60.6% 1.1%
Success 117 39.7% 117 39.4% 0.0%
Failure kind Base Count Base Ratio Head Count Head Ratio Change
buffer int 177 99.4% 179 99.4% 1.1%
list slice 1 0.6% 1 0.6% 0.0%

CALL

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

Specialized instructions that complete.

16,132,060 100.0% 19,658,484 100.0% 21.9%
deferred

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

1,201 0.0% 1,185 0.0% -1.3%
miss

Specialized instructions that deopt.

517 0.0% 517 0.0% 0.0%
Success Base Count Base Ratio Head Count Head Ratio Change
Success 3,495 100.0% 3,482 100.0% -0.4%
Failure 0 0.0% 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.

41 22.9% 41 22.9% 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.

346,462 9.4% 461,453 10.9% 33.2%
hit

Specialized instructions that complete.

3,324,029 90.4% 3,783,945 89.0% 13.8%
miss

Specialized instructions that deopt.

4,277 0.1% 4,277 0.1% 0.0%
Success Base Count Base Ratio Head Count Head Ratio Change
Failure 409 55.0% 434 56.4% 6.1%
Success 335 45.0% 336 43.6% 0.3%
Failure kind Base Count Base Ratio Head Count Head Ratio Change
float long 208 50.9% 234 53.9% 12.5%
different types 106 25.9% 105 24.2% -0.9%
big int 95 23.2% 95 21.9% 0.0%

CONTAINS_OP

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

Specialized instructions that complete.

1,145,852 100.0% 1,414,178 100.0% 23.4%
deferred

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

7 0.0% 7 0.0% 0.0%
Success Base Count Base Ratio Head Count Head Ratio Change
Success 7 100.0% 7 100.0% 0.0%
Failure 0 0.0% 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.

5,401,978 99.6% 5,632,028 99.6% 4.3%
deferred

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

21,788 0.4% 21,788 0.4% 0.0%
Success Base Count Base Ratio Head Count Head Ratio Change
Success 45 15.0% 48 15.8% 6.7%
Failure 256 85.0% 256 84.2% 0.0%
Failure kind Base Count Base Ratio Head Count Head Ratio Change
itertools 72 28.1% 72 28.1% 0.0%
callable 69 27.0% 69 27.0% 0.0%
other 50 19.5% 50 19.5% 0.0%
enumerate 50 19.5% 50 19.5% 0.0%
dict items 7 2.7% 7 2.7% 0.0%
dict values 3 1.2% 3 1.2% 0.0%
set 2 0.8% 2 0.8% 0.0%
ascii string 2 0.8% 2 0.8% 0.0%
reversed list 1 0.4% 1 0.4% 0.0%

LOAD_ATTR

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

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

3,918,280 11.7% 4,876,601 12.3% 24.5%
hit

Specialized instructions that complete.

29,088,233 87.2% 34,416,206 86.8% 18.3%
miss

Specialized instructions that deopt.

333,784 1.0% 333,985 0.8% 0.1%
deopt

Specialized instructions that deopt.

6 0.0% 6 0.0% 0.0%
Success Base Count Base Ratio Head Count Head Ratio Change
Failure 4,510 29.5% 4,730 30.6% 4.9%
Success 10,793 70.5% 10,727 69.4% -0.6%
Failure kind Base Count Base Ratio Head Count Head Ratio Change
overriding descriptor 1,066 23.6% 1,241 26.2% 16.4%
non overriding descriptor 665 14.7% 675 14.3% 1.5%
method 1,347 29.9% 1,347 28.5% 0.0%
non object slot 460 10.2% 460 9.7% 0.0%
class method obj 189 4.2% 189 4.0% 0.0%
mutable class 71 1.6% 71 1.5% 0.0%
not managed dict 45 1.0% 45 1.0% 0.0%
overridden 23 0.5% 23 0.5% 0.0%
metaclass attribute 23 0.5% 23 0.5% 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.

11,252,643 100.0% 14,051,133 100.0% 24.9%
deferred

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

815 0.0% 800 0.0% -1.8%
deopt

Specialized instructions that deopt.

9 0.0% 9 0.0% 0.0%
miss

Specialized instructions that deopt.

274 0.0% 274 0.0% 0.0%
Success Base Count Base Ratio Head Count Head Ratio Change
Success 2,355 100.0% 2,352 100.0% -0.1%
Failure 0 0.0% 0 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.

1,186,267 100.0% 1,607,938 100.0% 35.5%
deferred

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

13 0.0% 13 0.0% 0.0%
Success Base Count Base Ratio Head Count Head Ratio Change
Success 55 100.0% 55 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
hit

Specialized instructions that complete.

3,348,547 94.3% 4,115,278 95.3% 22.9%
deferred

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

59,835 1.7% 59,829 1.4% -0.0%
miss

Specialized instructions that deopt.

140,654 4.0% 140,654 3.3% 0.0%
Success Base Count Base Ratio Head Count Head Ratio Change
Success 3,625 86.6% 3,619 86.6% -0.2%
Failure 561 13.4% 561 13.4% 0.0%
Failure kind Base Count Base Ratio Head Count Head Ratio Change
property 344 61.3% 344 61.3% 0.0%
class attr simple 163 29.1% 163 29.1% 0.0%
overridden 44 7.8% 44 7.8% 0.0%
not in keys 10 1.8% 10 1.8% 0.0%

STORE_SUBSCR

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

Specialized instructions that complete.

1,212,290 98.3% 1,480,165 98.6% 22.1%
deferred

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

21,270 1.7% 21,264 1.4% -0.0%
Success Base Count Base Ratio Head Count Head Ratio Change
Success 26 12.2% 20 9.7% -23.1%
Failure 187 87.8% 187 90.3% 0.0%
Failure kind Base Count Base Ratio Head Count Head Ratio Change
py simple 119 63.6% 119 63.6% 0.0%
other 68 36.4% 68 36.4% 0.0%

TO_BOOL

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

Specialized instructions that complete.

7,059,273 99.1% 9,168,394 99.3% 29.9%
deferred

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

65,590 0.9% 66,078 0.7% 0.7%
miss

Specialized instructions that deopt.

28 0.0% 28 0.0% 0.0%
Success Base Count Base Ratio Head Count Head Ratio Change
Failure 531 54.4% 534 54.4% 0.6%
Success 445 45.6% 447 45.6% 0.4%
Failure kind Base Count Base Ratio Head Count Head Ratio Change
sequence 126 23.7% 130 24.3% 3.2%
mapping 176 33.1% 175 32.8% -0.6%
tuple 118 22.2% 118 22.1% 0.0%
other 68 12.8% 68 12.7% 0.0%
bytes 43 8.1% 43 8.1% 0.0%

UNPACK_SEQUENCE

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

Specialized instructions that complete.

1,955,750 100.0% 2,032,461 100.0% 3.9%
deferred

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

38 0.0% 38 0.0% 0.0%
Success Base Count Base Ratio Head Count Head Ratio Change
Success 110 100.0% 110 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
Not specialized

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

7,372,889 3.1% 9,443,634 3.3% 28.1%
Specialized hits

Specialized instructions, e.g. LOAD_ATTR_MODULE that complete.

74,409,936 31.0% 89,828,755 31.7% 20.7%
Basic

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

157,481,325 65.7% 183,174,700 64.7% 16.3%
Specialized misses

Specialized instructions, e.g. LOAD_ATTR_MODULE that deopt.

479,613 0.2% 479,805 0.2% 0.0%

Deferred by instruction

Breakdown of deferred (not specialized) instruction counts by family
Name Base Count Base Ratio Head Count Head Ratio Change
BINARY_OP 2,867,236 39.0% 3,863,915 41.0% 34.8%
COMPARE_OP 346,462 4.7% 461,453 4.9% 33.2%
LOAD_ATTR 3,918,280 53.3% 4,876,601 51.8% 24.5%
CALL 1,201 0.0% 1,185 0.0% -1.3%
TO_BOOL 65,590 0.9% 66,078 0.7% 0.7%
BINARY_SUBSCR 36,326 0.5% 36,244 0.4% -0.2%
STORE_SUBSCR 21,270 0.3% 21,264 0.2% -0.0%
STORE_ATTR 59,835 0.8% 59,829 0.6% -0.0%
FOR_ITER 21,788 0.3% 21,788 0.2% 0.0%
BINARY_SLICE 12,855 0.2% 12,855 0.1% 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 274,244 57.2% 274,453 57.2% 0.1%
LOAD_ATTR_METHOD_WITH_VALUES 49,490 10.3% 49,482 10.3% -0.0%
STORE_ATTR_INSTANCE_VALUE 140,654 29.3% 140,654 29.3% 0.0%
LOAD_ATTR_PROPERTY 9,895 2.1% 9,895 2.1% 0.0%
COMPARE_OP_INT 4,276 0.9% 4,276 0.9% 0.0%
CALL_METHOD_DESCRIPTOR_NOARGS 269 0.1% 269 0.1% 0.0%
LOAD_GLOBAL_BUILTIN 188 0.0% 188 0.0% 0.0%
CALL_METHOD_DESCRIPTOR_O 144 0.0% 144 0.0% 0.0%
LOAD_ATTR_MODULE 143 0.0% 143 0.0% 0.0%
LOAD_GLOBAL_MODULE 86 0.0% 86 0.0% 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 via PyEval_EvalFrame (api) 345,171 1.4% 421,825 1.5% 22.2%
Frames pushed 19,127,154 79.2% 22,808,019 81.9% 19.2%
Calls to Python functions inlined 17,031,722 70.5% 20,060,917 72.1% 17.8%
Calls via PyEval_EvalFrame (function vectorcall) 6,693,652 27.7% 7,345,322 26.4% 9.7%
Calls via PyEval_EvalFrame (vector) 6,693,708 27.7% 7,345,378 26.4% 9.7%
Calls to PyEval_EvalDefault 7,120,565 29.5% 7,772,235 27.9% 9.2%
Calls via PyEval_EvalFrame (total) 7,120,565 29.5% 7,772,235 27.9% 9.2%
Frame objects created 17,485 0.1% 17,402 0.1% -0.5%
Calls via PyEval_EvalFrame (generator) 426,857 1.8% 426,857 1.5% 0.0%
Calls via PyEval_EvalFrame (legacy) 15 0.0% 15 0.0% 0.0%
Calls via PyEval_EvalFrame (build class) 41 0.0% 41 0.0% 0.0%
Calls via PyEval_EvalFrame (slot) 456,471 1.9% 456,471 1.6% 0.0%
Calls via PyEval_EvalFrame (function ex) 441,507 1.8% 441,507 1.6% 0.0%
Calls via PyEval_EvalFrame (method) 2 0.0% 2 0.0% 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 dunder misses 29,403 18,596 -36.8%
Inline values 995,502 1,302,192 30.8%
Method cache hits 6,054,050 7,776,331 28.4%
Interpreter immortal decrefs 48,687,214 13.7% 59,692,534 14.3% 22.6%
Method cache misses 14,994 18,099 20.7%
Interpreter immortal increfs 49,773,396 16.2% 59,933,678 16.7% 20.4%
Allocations from freelist 13,431,615 48.4% 16,077,114 49.8% 19.7%
Frees to freelist 13,434,541 16,079,842 19.7%
Immortal increfs 46,769,097 15.3% 55,769,917 15.5% 19.2%
Interpreter mortal decrefs 129,639,703 36.5% 153,302,343 36.8% 18.3%
Method cache collisions 44,149 36,471 -17.4%
Interpreter mortal increfs 99,168,195 32.3% 116,274,876 32.3% 17.3%
Immortal decrefs 70,933,275 20.0% 83,152,829 20.0% 17.2%
Method cache dunder hits 8,931,070 10,398,618 16.4%
Mortal increfs 110,930,460 36.2% 127,973,343 35.6% 15.4%
Frees 15,135,796 17,282,597 14.2%
Mortal decrefs 105,869,863 29.8% 120,382,071 28.9% 13.7%
Allocations to 512 bytes 14,196,222 51.2% 16,074,413 49.8% 13.2%
Allocations 14,317,578 51.6% 16,195,781 50.2% 13.1%
Allocations to 4 kbytes 77,817 0.3% 77,830 0.2% 0.0%
Allocations over 4 kbytes 43,539 0.2% 43,538 0.1% -0.0%
Materialize dict (on request) 640 0.1% 640 0.0% 0.0%
Materialize dict (new key) 0 0.0% 0 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 Head Collections Head Objects collected Head Object visits
0 0 0 0 0 0 0
1 0 0 0 0 0 0
2 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
Traces created

The number of traces that were successfully created.

348 9.8% 395 10.5% 13.5%
Uops executed

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

340,778,060 1,665.2% 386,753,438 1,782.9% 13.5%
Trace stack overflow

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

198 5.6% 216 5.7% 9.1%
Traces executed

The number of traces that were executed

20,464,279 21,691,968 6.0%
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.

3,565 3,762 5.5%
Trace stack underflow

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

3,037 85.2% 3,187 84.7% 4.9%
Trace too short

A potential trace is abandoced because it it too short.

3,019 84.7% 3,151 83.8% 4.4%
Trace too long

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

0 0.0% 0 0.0%
Inner loop found

A trace is truncated because it has an inner loop

2 0.1% 2 0.1% 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.

0 0.0% 0 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.

344 98.9% 391 99.0% 13.7%
Optimizer attempts

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

348 395 13.5%
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

4 1.1% 4 1.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 98 28.2% 105 26.6% 7.1%
<= 16 23 6.6% 37 9.4% 60.9%
<= 32 63 18.1% 70 17.7% 11.1%
<= 64 99 28.4% 124 31.4% 25.3%
<= 128 33 9.5% 27 6.8% -18.2%
<= 256 31 8.9% 31 7.8% 0.0%
<= 512 1 0.3% 1 0.3% 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 50 14.4% 51 12.9% 2.0%
<= 8 64 18.4% 77 19.5% 20.3%
<= 16 30 8.6% 37 9.4% 23.3%
<= 32 82 23.6% 106 26.8% 29.3%
<= 64 77 22.1% 79 20.0% 2.6%
<= 128 38 10.9% 38 9.6% 0.0%
<= 256 3 0.9% 3 0.8% 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
_CALL_LIST_APPEND 99,132 137,481 38.7%
_LOAD_SUPER_ATTR_METHOD 297,369 412,350 38.7%
_INIT_CALL_PY_EXACT_ARGS_3 297,369 412,350 38.7%
_STORE_SUBSCR_DICT 99,123 137,450 38.7%
_TO_BOOL_INT 991,358 1,374,675 38.7%
_COPY_FREE_VARS 297,371 412,352 38.7%
_LOAD_DEREF 297,371 412,352 38.7%
_UNARY_INVERT 495,743 687,425 38.7%
_CALL_ISINSTANCE 297,375 412,356 38.7%
_LOAD_ATTR_NONDESCRIPTOR_WITH_VALUES 297,497 412,525 38.7%
_COMPARE_OP 99,192 137,541 38.7%
_BUILD_LIST 396,735 550,094 38.7%
_INIT_CALL_PY_EXACT_ARGS_1 1,094,716 1,516,353 38.5%
_BINARY_OP 1,594,788 2,208,118 38.5%
_LOAD_ATTR 999,513 1,382,874 38.4%
_CALL_BUILTIN_CLASS 404,512 557,837 37.9%
_LOAD_CONST_INLINE_WITH_NULL 1,123,826 1,545,451 37.5%
_INIT_CALL_PY_EXACT_ARGS 103,165 141,501 37.2%
_LOAD_ATTR_PROPERTY_FRAME 309,677 424,676 37.1%
_BINARY_SUBSCR_LIST_INT 210,560 287,232 36.4%
_RETURN_VALUE 1,518,340 2,055,129 35.4%
_CALL_BUILTIN_FAST 217,112 293,805 35.3%
_COMPARE_OP_INT 546,602 738,267 35.1%
_ITER_NEXT_RANGE 222,939 299,611 34.4%
_TO_BOOL_BOOL 893,411 1,200,222 34.3%
_GUARD_NOT_EXHAUSTED_RANGE 338,706 453,714 34.0%
_ITER_CHECK_RANGE 338,706 453,714 34.0%
_CALL_LEN 113,661 152,002 33.7%
_PY_FRAME_GENERAL 478,227 631,618 32.1%
_RESUME_CHECK 3,349,554 4,422,971 32.0%
_GUARD_DORV_VALUES_INST_ATTR_FROM_DICT 2,675,543 3,519,016 31.5%
_GUARD_KEYS_VERSION 2,675,543 3,519,016 31.5%
_LOAD_ATTR_METHOD_WITH_VALUES 2,378,046 3,106,491 30.6%
_CHECK_STACK_SPACE_OPERAND 1,945,981 2,521,074 29.6%
_SAVE_RETURN_OFFSET 4,075,108 5,263,560 29.2%
_GUARD_IS_FALSE_POP 1,731,277 2,230,488 28.8%
_CHECK_FUNCTION_VERSION 3,761,280 4,834,733 28.5%
_LOAD_CONST_INLINE_BORROW 5,829,289 7,477,140 28.3%
_CALL_METHOD_DESCRIPTOR_NOARGS 136,326 174,710 28.2%
_CHECK_FUNCTION_EXACT_ARGS 3,283,053 4,203,115 28.0%
_CHECK_FUNCTION 3,420,258 4,378,509 28.0%
_LOAD_FAST_1 6,049,184 7,697,415 27.2%
_STORE_FAST_1 1,430,108 1,813,476 26.8%
_STORE_FAST_3 1,341,566 1,686,578 25.7%
_INIT_CALL_PY_EXACT_ARGS_0 1,376,073 1,721,181 25.1%
_GUARD_IS_TRUE_POP 2,381,055 2,916,505 22.5%
_GUARD_NOS_INT 1,057,863 1,287,167 21.7%
_CALL_METHOD_DESCRIPTOR_FAST 907,952 1,098,948 21.0%
_LOAD_FAST_0 9,513,576 11,465,476 20.5%
_LOAD_FAST_3 2,828,141 3,403,169 20.3%
_GUARD_IS_NOT_NONE_POP 1,726,915 2,071,867 20.0%
_STORE_FAST_4 1,733,033 2,078,034 19.9%
_GUARD_TYPE_VERSION 8,225,732 9,834,840 19.6%
_LOAD_CONST_INLINE_BORROW_WITH_NULL 826,783 980,109 18.5%
_LOAD_CONST_INLINE 932,369 1,085,709 16.4%
_LOAD_FAST_6 784,722 899,759 14.7%
_GET_ITER 1,339,858 1,531,549 14.3%
_LOAD_ATTR_INSTANCE_VALUE_0 6,809,871 7,765,016 14.0%
_CHECK_MANAGED_OBJECT_HAS_VALUES 6,826,646 7,781,789 14.0%
_PUSH_FRAME 8,720,348 9,908,800 13.6%
_CHECK_VALIDITY 20,670,031 23,389,492 13.2%
_SET_IP 28,933,422 32,687,980 13.0%
_LOAD_FAST_4 2,465,133 2,771,778 12.4%
_COPY 1,236,794 1,389,477 12.3%
_STORE_FAST_7 637,256 713,974 12.0%
_STORE_FAST_6 637,262 713,980 12.0%
_LOAD_FAST_7 1,306,114 1,459,500 11.7%
_LOAD_FAST_2 8,545,058 9,540,954 11.7%
_POP_TOP 8,169,404 9,088,527 11.3%
_LOAD_ATTR_METHOD_NO_DICT 2,448,976 2,716,011 10.9%
_LOAD_FAST 2,797,883 3,066,248 9.6%
_GUARD_NOT_EXHAUSTED_LIST 6,199,235 6,774,256 9.3%
_ITER_CHECK_LIST 6,199,235 6,774,256 9.3%
_LOAD_FAST_5 1,253,568 1,368,609 9.2%
_SWAP 1,710,916 1,863,683 8.9%
_GUARD_IS_NONE_POP 514,897 553,248 7.4%
_UNPACK_SEQUENCE_TWO_TUPLE 517,350 555,702 7.4%
_EXIT_TRACE 15,076,633 16,189,298 7.4%
_STORE_FAST_5 1,040,967 1,117,646 7.4%
_CONTAINS_OP_DICT 515,490 553,450 7.4%
_COMPARE_OP_STR 527,362 565,703 7.3%
_GUARD_BOTH_UNICODE 527,421 565,762 7.3%
_GUARD_DORV_NO_DICT 531,863 569,539 7.1%
_STORE_ATTR_INSTANCE_VALUE 531,863 569,539 7.1%
_TO_BOOL 555,147 593,383 6.9%
_PUSH_NULL 2,263,973 2,417,321 6.8%
_CHECK_PERIODIC 18,233,970 19,382,201 6.3%
_JUMP_TO_TOP 592,767 629,894 6.3%
_CHECK_VALIDITY_AND_SET_IP 8,128,926 8,627,271 6.1%
_MAKE_WARM 21,057,046 22,321,862 6.0%
_START_EXECUTOR 20,464,279 21,691,968 6.0%
_CALL_NON_PY_GENERAL 2,604,049 2,757,362 5.9%
_CHECK_IS_NOT_PY_CALLABLE 2,604,049 2,757,362 5.9%
_STORE_FAST_2 5,237,926 5,467,265 4.4%
_ITER_NEXT_LIST 4,730,793 4,922,460 4.1%
_BUILD_TUPLE 1,357,428 1,395,777 2.8%
_TIER2_RESUME_CHECK 5,955,521 6,108,496 2.6%
_DYNAMIC_EXIT 5,370,792 5,485,827 2.1%
_STORE_FAST 2,640,622 2,678,971 1.5%
_BINARY_OP_ADD_INT 411,966 411,276 -0.2%
_CALL_METHOD_DESCRIPTOR_O 418,459 417,769 -0.2%
_UNARY_NOT 16,429 16,447 0.1%
_DEOPT 16,854 16,843 -0.1%
_POP_TOP_LOAD_CONST_INLINE_BORROW 44,031 44,039 0.0%
_CALL_METHOD_DESCRIPTOR_FAST_WITH_KEYWORDS 11,921 11,919 -0.0%
_LOAD_ATTR_INSTANCE_VALUE_1 16,775 16,773 -0.0%
_FOR_ITER_GEN_FRAME 4,645,240 4,645,240 0.0%
_FOR_ITER_TIER_TWO 918,323 918,323 0.0%
_BUILD_MAP 829,765 829,765 0.0%
_LOAD_SPECIAL 823,550 823,550 0.0%
_UNPACK_SEQUENCE_TUPLE 819,293 819,293 0.0%
_CALL_TUPLE_1 422,270 422,270 0.0%
_CHECK_STACK_SPACE 411,776 411,776 0.0%
_INIT_CALL_PY_EXACT_ARGS_2 411,730 411,730 0.0%
_BINARY_SUBSCR 411,726 411,726 0.0%
_DICT_MERGE 411,718 411,718 0.0%
_LIST_APPEND 61,094 61,094 0.0%
_GUARD_BOTH_FLOAT 60,911 60,911 0.0%
_BINARY_SUBSCR_STR_INT 60,907 60,907 0.0%
_BINARY_OP_MULTIPLY_FLOAT 60,907 60,907 0.0%
_CALL_BUILTIN_O 60,907 60,907 0.0%
_CALL_BUILTIN_FAST_WITH_KEYWORDS 14,341 14,341 0.0%
_GUARD_NOT_EXHAUSTED_TUPLE 8,564 8,564 0.0%
_ITER_CHECK_TUPLE 8,564 8,564 0.0%
_LOAD_CONST 8,302 8,302 0.0%
_CHECK_CALL_BOUND_METHOD_EXACT_ARGS 6,391 6,391 0.0%
_INIT_CALL_BOUND_METHOD_EXACT_ARGS 6,391 6,391 0.0%
_BINARY_OP_SUBTRACT_INT 6,385 6,385 0.0%
_CHECK_ATTR_METHOD_LAZY_DICT 6,385 6,385 0.0%
_LOAD_ATTR_METHOD_LAZY_DICT 6,385 6,385 0.0%
_IMPORT_FROM 4,151 4,151 0.0%
_IMPORT_NAME 4,151 4,151 0.0%
_CHECK_FUNCTION_VERSION_KW 4,151 4,151 0.0%
_PY_FRAME_KW 4,151 4,151 0.0%
_STORE_FAST_0 4,077 4,077 0.0%
_TO_BOOL_STR 191 191 0.0%
_ITER_NEXT_TUPLE 189 189 0.0%
_LOAD_FAST_AND_CLEAR 59 59 0.0%
_BINARY_OP_ADD_UNICODE 59 59 0.0%
_GUARD_BOTH_INT 21 21 0.0%
_BINARY_SUBSCR_DICT 6 6 0.0%
_BINARY_SUBSCR_TUPLE_INT 4 4 0.0%
_CONTAINS_OP_SET 4 4 0.0%
_COMPARE_OP_FLOAT 4 4 0.0%
_LOAD_ATTR_SLOT_0 4 4 0.0%
_MAKE_FUNCTION 2 2 0.0%
_RETURN_GENERATOR 2 2 0.0%
_SET_FUNCTION_ATTRIBUTE 2 2 0.0%
_STORE_DEREF 2 2 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
Opcode Base Count Head Count Change
CALL_FUNCTION_EX 156 156 0.0%

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 42 42 0.0%

Stats gathered on: 2024-10-26