Skip to content

Commit d34c6a6

Browse files
author
antoine.pitrou
committed
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. git-svn-id: http://svn.python.org/projects/python/branches/py3k@68924 6015fed2-1504-0410-9fe1-9d1591cc4771
1 parent 47a2f56 commit d34c6a6

8 files changed

Lines changed: 6347 additions & 4994 deletions

File tree

Makefile.pre.in

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,16 @@ ASDLGEN= $(srcdir)/Parser/asdl_c.py
247247

248248
##########################################################################
249249
# Python
250+
251+
OPCODETARGETS_H= \
252+
$(srcdir)/Python/opcode_targets.h
253+
254+
OPCODETARGETGEN= \
255+
$(srcdir)/Python/makeopcodetargets.py
256+
257+
OPCODETARGETGEN_FILES= \
258+
$(OPCODETARGETGEN) $(srcdir)/Lib/opcode.py
259+
250260
PYTHON_OBJS= \
251261
Python/_warnings.o \
252262
Python/Python-ast.o \
@@ -567,6 +577,11 @@ Objects/unicodeobject.o: $(srcdir)/Objects/unicodeobject.c \
567577
$(BYTESTR_DEPS) \
568578
$(srcdir)/Objects/stringlib/formatter.h
569579

580+
$(OPCODETARGETS_H): $(OPCODETARGETGEN_FILES)
581+
$(OPCODETARGETGEN) $(OPCODETARGETS_H)
582+
583+
Python/ceval.o: $(OPCODETARGETS_H)
584+
570585
Python/formatter_unicode.o: $(srcdir)/Python/formatter_unicode.c \
571586
$(BYTESTR_DEPS)
572587

Misc/NEWS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ What's New in Python 3.1 alpha 0
1212
Core and Builtins
1313
-----------------
1414

15+
- Issue #4753: By enabling a configure option named '--with-computed-gotos'
16+
on compilers that support it (notably: gcc, SunPro, icc), the bytecode
17+
evaluation loop is compiled with a new dispatch mechanism which gives
18+
speedups of up to 20%, depending on the system, on various benchmarks.
19+
1520
- Issue #4874: Most builtin decoders now reject unicode input.
1621

1722
- Issue #4842: Don't allow trailing 'L' when constructing an integer

0 commit comments

Comments
 (0)