needforspeed: added Py_LOCAL macro, based on the LOCAL macro used
for SRE and others. applied Py_LOCAL to relevant portion of ceval,
which gives a 1-2% speedup on my machine. ymmv.
diff --git a/Include/pyport.h b/Include/pyport.h
index fe79f6d..7d51d0a 100644
--- a/Include/pyport.h
+++ b/Include/pyport.h
@@ -137,6 +137,23 @@
# endif
#endif
+/* PY_LOCAL can be used instead of static to get the fastest possible calling
+ * convention for functions that are local to a given module. It also enables
+ * inlining, where suitable. */
+
+#undef USE_INLINE /* XXX - set via configure? */
+
+#if defined(_MSC_VER)
+ /* ignore warnings if the compiler decides not to inline a function */
+#pragma warning(disable: 4710)
+/* fastest possible local call under MSVC */
+#define Py_LOCAL(type) static __inline type __fastcall
+#elif defined(USE_INLINE)
+#define Py_LOCAL(type) static inline type
+#else
+#define Py_LOCAL(type) static type
+#endif
+
#include <stdlib.h>
#include <math.h> /* Moved here from the math section, before extern "C" */