Skip to content

Instantly share code, notes, and snippets.

@rofl0r
Created April 7, 2019 23:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rofl0r/acd9da221c3c3f07213e87128ed37288 to your computer and use it in GitHub Desktop.
Save rofl0r/acd9da221c3c3f07213e87128ed37288 to your computer and use it in GitHub Desktop.
patch to permanently enable optimization for python 2.7.15
--- Python-2.7.15.org/Python/compile.c
+++ Python-2.7.15/Python/compile.c
@@ -32,7 +32,7 @@
#include "symtable.h"
#include "opcode.h"
-int Py_OptimizeFlag = 0;
+int Py_OptimizeFlag = 1;
#define DEFAULT_BLOCK_SIZE 16
#define DEFAULT_BLOCKS 8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment