Commits

Alex Gaynor  committed 68fbc67

allow inlining into more of the thread library, specifically for get_ident, which used to be rendered as a call_may_force, and is now properly elided. Seems to be worth about 5% on the sqlite benchmark.

  • Participants
  • Parent commits 0f01535

Comments (0)

Files changed (2)

File pypy/module/pypyjit/policy.py

                 modname == '__builtin__.interp_classobj' or
                 modname == '__builtin__.functional' or
                 modname == '__builtin__.descriptor' or
-                modname == 'thread.os_local'):
+                modname == 'thread.os_local' or
+                modname == 'thread.os_thread'):
             return True
         if '.' in modname:
             modname, _ = modname.split('.', 1)

File pypy/module/pypyjit/test/test_policy.py

 
 def test_thread_local():
     from pypy.module.thread.os_local import Local
+    from pypy.module.thread.os_thread import get_ident
     assert pypypolicy.look_inside_function(Local.getdict.im_func)
+    assert pypypolicy.look_inside_function(get_ident)
 
 def test_pypy_module():
     from pypy.module._collections.interp_deque import W_Deque