-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize python with LTO & no-semantic (#82)
* Optimize python with LTO & no-semantic * Change optimize * align patch also to 3.7
- Loading branch information
Showing
5 changed files
with
46 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
Author: Dave Jones <[email protected]> | ||
Description: Use aligned access for _sha3 module on ARM. | ||
--- a/Modules/_sha3/sha3module.c | ||
+++ b/Modules/_sha3/sha3module.c | ||
@@ -64,6 +64,12 @@ | ||
#define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN | ||
#endif | ||
|
||
+/* Bus error on 32-bit ARM due to un-aligned memory accesses; 64-bit ARM | ||
+ * doesn't complain but un-aligned memory accesses are sub-optimal */ | ||
+#if defined(__arm__) || defined(__aarch64__) | ||
+#define NO_MISALIGNED_ACCESSES | ||
+#endif | ||
+ | ||
/* mangle names */ | ||
#define KeccakF1600_FastLoop_Absorb _PySHA3_KeccakF1600_FastLoop_Absorb | ||
#define Keccak_HashFinal _PySHA3_Keccak_HashFinal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
Author: Dave Jones <[email protected]> | ||
Description: Use aligned access for _sha3 module on ARM. | ||
--- a/Modules/_sha3/sha3module.c | ||
+++ b/Modules/_sha3/sha3module.c | ||
@@ -64,6 +64,12 @@ | ||
#define PLATFORM_BYTE_ORDER IS_BIG_ENDIAN | ||
#endif | ||
|
||
+/* Bus error on 32-bit ARM due to un-aligned memory accesses; 64-bit ARM | ||
+ * doesn't complain but un-aligned memory accesses are sub-optimal */ | ||
+#if defined(__arm__) || defined(__aarch64__) | ||
+#define NO_MISALIGNED_ACCESSES | ||
+#endif | ||
+ | ||
/* mangle names */ | ||
#define KeccakF1600_FastLoop_Absorb _PySHA3_KeccakF1600_FastLoop_Absorb | ||
#define Keccak_HashFinal _PySHA3_Keccak_HashFinal |