Uh oh!
There was an error while loading. Please reload this page.
gh-117578: Fix inlining regression in PyType_GetModuleByDef() - #123100
gh-117578: Fix inlining regression in PyType_GetModuleByDef()#123100neonene wants to merge 4 commits into
Conversation
encukou
commented
Aug 19, 2024
Hm, it doesn't sound right to override profile-guided optimization, especially since |
It is mentioned on the faster-cpython repo that the telco test has slowed down a lot. According to MSVC, the module state access counts were: Tested with the
This patch would need to be applied if we wanted as much speed as the global state access on Windows, which has little effect alone (1%) for some reason. |
neonene
commented
Aug 20, 2024
Windows PGO: |
Is it acceptable that @requires_cdecimalclassCArithmeticOperatorsTest(ArithmeticOperatorsTest, unittest.TestCase):
...
@unittest.skipIf(nottest.support.PGO, 'PGO training only')deftest_excecise_binop(self):
Decimal=self.decimal.Decimald=Decimal('11.1')
foriinrange(500000):
1+d# at least 300000 times |
neonene
commented
Aug 21, 2024
I'll try |
neonene
commented
Aug 26, 2024
Closing in favor of proposing the |
On
mainand3.13, there are cases where theget_module_by_deffunction intypeobject.cis not inlined in its wrapper functions:get_module_by_def()PyType_GetModuleByDef()/Ob2:called/Ob3:inlined_PyType_GetModuleByDef2()/Ob2:called/Ob3:inlinedNon-builtin modules can have extra function-call overheads, where the wrappers cannot be inlined.
This PR specifies
Py_ALWAYS_INLINEto the callee.cc @encukou