mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-22 21:32:31 +00:00
Perform build and magnum tuning
Building o//third_party/python now takes 5 seconds on my PC This change works towards modifying Python to use runtime dispatching when appropriate. For example, when loading the magnums in the socket module, it's a good idea to check if the magnum is zero, because that means the local system platform doesn't support it.
This commit is contained in:
parent
ee7e296339
commit
d26d7ae0e4
1028 changed files with 6576 additions and 172777 deletions
|
@ -1,3 +1,4 @@
|
|||
/* clang-format off */
|
||||
/*
|
||||
* Written in 2013 by Dmitry Chestnykh <dmitry@codingrobots.com>
|
||||
* Modified for CPython by Christian Heimes <christian@python.org>
|
||||
|
@ -13,14 +14,14 @@
|
|||
* The blake2s_impl.c is autogenerated from blake2b_impl.c.
|
||||
*/
|
||||
|
||||
#include "Python.h"
|
||||
#include "pystrhex.h"
|
||||
#include "third_party/python/Include/Python.h"
|
||||
#include "third_party/python/Include/pystrhex.h"
|
||||
#ifdef WITH_THREAD
|
||||
#include "pythread.h"
|
||||
#include "third_party/python/Include/pythread.h"
|
||||
#endif
|
||||
|
||||
#include "../hashlib.h"
|
||||
#include "blake2ns.h"
|
||||
#include "third_party/python/Modules/hashlib.h"
|
||||
#include "third_party/python/Modules/_blake2/blake2ns.h"
|
||||
|
||||
#define HAVE_BLAKE2B 1
|
||||
#define BLAKE2_LOCAL_INLINE(type) Py_LOCAL_INLINE(type)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* clang-format off */
|
||||
/*
|
||||
* Written in 2013 by Dmitry Chestnykh <dmitry@codingrobots.com>
|
||||
* Modified for CPython by Christian Heimes <christian@python.org>
|
||||
|
@ -8,9 +9,9 @@
|
|||
* any warranty. http://creativecommons.org/publicdomain/zero/1.0/
|
||||
*/
|
||||
|
||||
#include "Python.h"
|
||||
#include "third_party/python/Include/Python.h"
|
||||
|
||||
#include "impl/blake2.h"
|
||||
#include "third_party/python/Modules/_blake2/impl/blake2.h"
|
||||
|
||||
extern PyTypeObject PyBlake2_BLAKE2bType;
|
||||
extern PyTypeObject PyBlake2_BLAKE2sType;
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* clang-format off */
|
||||
/* Prefix all public blake2 symbols with PyBlake2_
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* clang-format off */
|
||||
/*
|
||||
* Written in 2013 by Dmitry Chestnykh <dmitry@codingrobots.com>
|
||||
* Modified for CPython by Christian Heimes <christian@python.org>
|
||||
|
@ -13,25 +14,25 @@
|
|||
* The blake2s_impl.c is autogenerated from blake2s_impl.c.
|
||||
*/
|
||||
|
||||
#include "Python.h"
|
||||
#include "pystrhex.h"
|
||||
#include "third_party/python/Include/Python.h"
|
||||
#include "third_party/python/Include/pystrhex.h"
|
||||
#ifdef WITH_THREAD
|
||||
#include "pythread.h"
|
||||
#include "third_party/python/Include/pythread.h"
|
||||
#endif
|
||||
|
||||
#include "../hashlib.h"
|
||||
#include "blake2ns.h"
|
||||
#include "third_party/python/Modules/hashlib.h"
|
||||
#include "third_party/python/Modules/_blake2/blake2ns.h"
|
||||
|
||||
#define HAVE_BLAKE2S 1
|
||||
#define BLAKE2_LOCAL_INLINE(type) Py_LOCAL_INLINE(type)
|
||||
|
||||
#include "impl/blake2.h"
|
||||
#include "impl/blake2-impl.h" /* for secure_zero_memory() and store48() */
|
||||
#include "third_party/python/Modules/_blake2/impl/blake2.h"
|
||||
#include "third_party/python/Modules/_blake2/impl/blake2-impl.h" /* for secure_zero_memory() and store48() */
|
||||
|
||||
#ifdef BLAKE2_USE_SSE
|
||||
#include "impl/blake2s.c"
|
||||
#include "third_party/python/Modules/_blake2/impl/blake2s.c"
|
||||
#else
|
||||
#include "impl/blake2s-ref.c"
|
||||
#include "third_party/python/Modules/_blake2/impl/blake2s-ref.c"
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -46,7 +47,7 @@ typedef struct {
|
|||
#endif
|
||||
} BLAKE2sObject;
|
||||
|
||||
#include "clinic/blake2s_impl.c.h"
|
||||
#include "third_party/python/Modules/_blake2/clinic/blake2s_impl.c.h"
|
||||
|
||||
/*[clinic input]
|
||||
module _blake2
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* clang-format off */
|
||||
/*
|
||||
BLAKE2 reference source code package - optimized C implementations
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* clang-format off */
|
||||
/*
|
||||
BLAKE2 reference source code package - optimized C implementations
|
||||
|
||||
|
@ -16,9 +17,6 @@
|
|||
#ifndef __BLAKE2_IMPL_H__
|
||||
#define __BLAKE2_IMPL_H__
|
||||
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
|
||||
BLAKE2_LOCAL_INLINE(uint32_t) load32( const void *src )
|
||||
{
|
||||
#if defined(NATIVE_LITTLE_ENDIAN)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* clang-format off */
|
||||
/*
|
||||
BLAKE2 reference source code package - reference C implementations
|
||||
|
||||
|
@ -16,9 +17,6 @@
|
|||
#ifndef __BLAKE2_H__
|
||||
#define __BLAKE2_H__
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef BLAKE2_NO_INLINE
|
||||
#define BLAKE2_LOCAL_INLINE(type) static type
|
||||
#endif
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* clang-format off */
|
||||
/*
|
||||
BLAKE2 reference source code package - optimized C implementations
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* clang-format off */
|
||||
/*
|
||||
BLAKE2 reference source code package - optimized C implementations
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* clang-format off */
|
||||
/*
|
||||
BLAKE2 reference source code package - reference C implementations
|
||||
|
||||
|
@ -13,10 +14,6 @@
|
|||
https://blake2.net.
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "blake2.h"
|
||||
#include "blake2-impl.h"
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* clang-format off */
|
||||
/*
|
||||
BLAKE2 reference source code package - optimized C implementations
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* clang-format off */
|
||||
/*
|
||||
BLAKE2 reference source code package - optimized C implementations
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* clang-format off */
|
||||
/*
|
||||
BLAKE2 reference source code package - optimized C implementations
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* clang-format off */
|
||||
/*
|
||||
BLAKE2 reference source code package - optimized C implementations
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* clang-format off */
|
||||
/*
|
||||
BLAKE2 reference source code package - optimized C implementations
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* clang-format off */
|
||||
/*
|
||||
BLAKE2 reference source code package - reference C implementations
|
||||
|
||||
|
@ -13,10 +14,6 @@
|
|||
https://blake2.net.
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "blake2.h"
|
||||
#include "blake2-impl.h"
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* clang-format off */
|
||||
/*
|
||||
BLAKE2 reference source code package - optimized C implementations
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* clang-format off */
|
||||
/*
|
||||
BLAKE2 reference source code package - optimized C implementations
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue