Hi there,
I wondered how Python detects integer overflows and searched the
corresponding code snippets in Python's source (Objects/intobject.c).
Because ANSI-C can't detect int overflow errors, there are very strange
workarounds for all the basic arithmetic.
I asked myself if it will be a big performance boost when someone will
re-code this routines in assembler, because an overflow can be detected very
simply by checking a processor-flag after performing the operation. Has
someone done this already? What speedup-factor would an optimization of this
kind have to the average Python code? Is it worth the work? (Let's say for
Linux/i386 machines). I'm not an Intel-assembly guy (only M68K experience),
but I think this wouldn't be too much efford for an Intel hacker, is it?
Felix
---
Dipl.-Ing. Felix von Delius Fon: 0911/4244-110
Projektleiter-IT Fax: 0911/4244-100
EBox GmbH - Agentur für neue Medien Mobil: 0172/8261220
Vordere Cramergasse 11 Email: delius@ebox.de
D-90425 Nuernberg Web: http://www.ebox.de
I wondered how Python detects integer overflows and searched the
corresponding code snippets in Python's source (Objects/intobject.c).
Because ANSI-C can't detect int overflow errors, there are very strange
workarounds for all the basic arithmetic.
I asked myself if it will be a big performance boost when someone will
re-code this routines in assembler, because an overflow can be detected very
simply by checking a processor-flag after performing the operation. Has
someone done this already? What speedup-factor would an optimization of this
kind have to the average Python code? Is it worth the work? (Let's say for
Linux/i386 machines). I'm not an Intel-assembly guy (only M68K experience),
but I think this wouldn't be too much efford for an Intel hacker, is it?
Felix
---
Dipl.-Ing. Felix von Delius Fon: 0911/4244-110
Projektleiter-IT Fax: 0911/4244-100
EBox GmbH - Agentur für neue Medien Mobil: 0172/8261220
Vordere Cramergasse 11 Email: delius@ebox.de
D-90425 Nuernberg Web: http://www.ebox.de