summaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2009-01-25 16:34:23 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2009-01-25 16:34:23 (GMT)
commitb52ec78baf236272800017fdb2b7f243741c1851 (patch)
tree9413ca8258942269b39cc831a6788be0c772f203 /configure.in
parente6aad75f2ba571de7f1bebcf6b1251c2c22360f1 (diff)
downloadcpython-b52ec78baf236272800017fdb2b7f243741c1851.zip
cpython-b52ec78baf236272800017fdb2b7f243741c1851.tar.gz
cpython-b52ec78baf236272800017fdb2b7f243741c1851.tar.bz2
Issue #4753: By enabling a configure option named '--with-computed-gotos'
on compilers that support it (notably: gcc, SunPro, icc), the bytecode evaluation loop is compiled with a new dispatch mechanism which gives speedups of up to 20%, depending on the system, on various benchmarks.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in16
1 files changed, 16 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 12e4c80..a29a4c5 100644
--- a/configure.in
+++ b/configure.in
@@ -3660,6 +3660,22 @@ then
wide chars that would be converted.])
fi
+# Check for --with-computed-gotos
+AC_MSG_CHECKING(for --with-computed-gotos)
+AC_ARG_WITH(computed-gotos,
+ AC_HELP_STRING(--with-computed-gotos,
+ Use computed gotos / threaded dispatch in evaluation loop (not available on all compilers)),
+[
+if test "$withval" != no
+then
+ AC_DEFINE(USE_COMPUTED_GOTOS, 1,
+ [Define if you want to use computed gotos in ceval.c.])
+ AC_MSG_RESULT(yes)
+else AC_MSG_RESULT(no)
+fi],
+[AC_MSG_RESULT(no)])
+
+
AC_SUBST(THREADHEADERS)
for h in `(cd $srcdir;echo Python/thread_*.h)`