mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-22 21:32:31 +00:00
Add speedups from pyston (#264)
This should make Python go 30% faster. It does that by trading away some debuggability, like _tracemalloc. It can be re-enabled using `make MODE=dbg`.
This commit is contained in:
parent
31dd714081
commit
27f7ffd4fd
15 changed files with 175 additions and 12 deletions
3
third_party/python/Lib/test/test_code.py
vendored
3
third_party/python/Lib/test/test_code.py
vendored
|
@ -102,6 +102,7 @@ consts: ('None',)
|
|||
|
||||
"""
|
||||
|
||||
import _cosmo
|
||||
import inspect
|
||||
import sys
|
||||
try:
|
||||
|
@ -298,6 +299,7 @@ if check_impl_detail(cpython=True) and ctypes is not None:
|
|||
# away, so we eval a lambda.
|
||||
return eval('lambda:42')
|
||||
|
||||
@unittest.skipUnless(_cosmo.MODE == "dbg", "requires APE debug build")
|
||||
def test_get_non_code(self):
|
||||
f = self.get_func()
|
||||
|
||||
|
@ -306,6 +308,7 @@ if check_impl_detail(cpython=True) and ctypes is not None:
|
|||
self.assertRaises(SystemError, GetExtra, 42, FREE_INDEX,
|
||||
ctypes.c_voidp(100))
|
||||
|
||||
@unittest.skipUnless(_cosmo.MODE == "dbg", "requires APE debug build")
|
||||
def test_bad_index(self):
|
||||
f = self.get_func()
|
||||
self.assertRaises(SystemError, SetExtra, f.__code__,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue