mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-23 02:50:29 +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
9
third_party/python/Modules/config.c
vendored
9
third_party/python/Modules/config.c
vendored
|
@ -27,6 +27,7 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
|||
#include "third_party/python/Include/pyport.h"
|
||||
#include "third_party/python/Include/pyport.h"
|
||||
#include "third_party/python/Include/Python.h"
|
||||
#include "third_party/python/Include/cosmo.h"
|
||||
|
||||
PyObject* PyInit__decimal(void);
|
||||
PyObject* PyInit_audioop(void);
|
||||
|
@ -47,7 +48,9 @@ PyObject* PyInit__locale(void);
|
|||
PyObject* PyInit__io(void);
|
||||
PyObject* PyInit_zipimport(void);
|
||||
PyObject* PyInit_faulthandler(void);
|
||||
#ifdef MODE_DBG
|
||||
PyObject* PyInit__tracemalloc(void);
|
||||
#endif
|
||||
PyObject* PyInit__symtable(void);
|
||||
PyObject* PyInit_array(void);
|
||||
PyObject* PyInit_cmath(void);
|
||||
|
@ -99,6 +102,7 @@ PyObject *PyInit__sqlite3(void);
|
|||
|
||||
PyObject* PyMarshal_Init(void);
|
||||
PyObject* PyInit_imp(void);
|
||||
PyObject* PyInit_cosmo(void);
|
||||
PyObject* PyInit_gc(void);
|
||||
PyObject* PyInit__ast(void);
|
||||
PyObject* _PyWarnings_Init(void);
|
||||
|
@ -123,7 +127,9 @@ struct _inittab _PyImport_Inittab[] = {
|
|||
{"_locale", PyInit__locale},
|
||||
{"_io", PyInit__io},
|
||||
{"faulthandler", PyInit_faulthandler},
|
||||
#ifdef USE_TRACEMALLOC
|
||||
{"_tracemalloc", PyInit__tracemalloc},
|
||||
#endif
|
||||
{"_symtable", PyInit__symtable},
|
||||
{"array", PyInit_array},
|
||||
{"cmath", PyInit_cmath},
|
||||
|
@ -184,6 +190,9 @@ struct _inittab _PyImport_Inittab[] = {
|
|||
/* This lives in import.c */
|
||||
{"_imp", PyInit_imp},
|
||||
|
||||
/* This lives in cosmomodule.c */
|
||||
{"_cosmo", PyInit_cosmo},
|
||||
|
||||
/* This lives in Python/Python-ast.c */
|
||||
{"_ast", PyInit__ast},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue