Skip to content

Instantly share code, notes, and snippets.

View chris-eibl's full-sized avatar

Chris Eibl chris-eibl

  • Austria
  • 07:27 (UTC +01:00)
View GitHub Profile
@chris-eibl
chris-eibl / top_call_counts.md
Last active October 27, 2025 17:41
Profile of pystone for MSVC PGO build showing the effect of not being able to inline stack refs et al.
Function Name Total [unit, %] Self [unit, %] Call Count Module Avg Self Max Self Min Self Avg Total Max Total Min Total
PyStackRef_CLOSE_SPECIALIZED 131,73ms (7,34 %) 131,69ms (7,34 %) 972192 python315 100ns 131,55ms 100ns 100ns 131,55ms 100ns
_PyLong_CheckExactAndCompact 64,01ms (3,57 %) 64,01ms (3,57 %) 931156 python315 0ns 63,94ms 100ns 0ns 63,94ms 100ns
_PyStackRef_FromPyObjectNew 498,31ms (27,76 %) 498,31ms (27,76 %) 764658 python315 600ns 497,32ms 0ns 600ns 497,32ms 0ns
dictkeys_get_index 15,21ms (0,85 %) 15,21ms (0,85 %) 263503 python315 0ns 3,70ms 0ns 0ns 3,70ms 0ns
Py_DECREF_MORTAL 22,66ms (1,26 %) 20,87ms (1,16 %) 256257 python315 0ns 20,65ms 0ns 0ns 19,39ms 0ns
PyStackRef_AsPyObjectSteal 15,93ms (0,89 %) 15,93ms (0,89 %) 233924 python315 0ns 15,69ms 0ns 0ns 15,69ms 0ns
+----------------------------------+-------------------------+---------------------------------+--------------------------+------------------------------------+-----------------------------+-------------------------------------------+
| Benchmark | msvc.release.9db1a297d9 | clang.release.18.1.8.9db1a297d9 | clang.release.9db1a297d9 | clang.release.cg.18.1.8.9db1a297d9 | clang.release.cg.9db1a297d9 | clang.release.tc.gc.20.1.0.rc2.9db1a297d9 |
+==================================+=========================+=================================+==========================+====================================+=============================+===========================================+
| Geometric mean | (ref) | 1.32x faster | 1.27x faster | 1.34x faster | 1.27x faster | 1.40x faster |
+----------------------------------+-------------------------+----------------------