[issue2792] alternate fast builtin sum, rev'd

2008-05-08 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: Sorry, I really do not want to change the existing code. It's clear, does exactly what it's supposed to do, is easily checked for correctness, been seen and exercised in the alphas for a good while. It gives a good tenfold speed-up (YM

[issue2792] alternate fast builtin sum, rev'd

2008-05-08 Thread Raymond Hettinger
Changes by Raymond Hettinger <[EMAIL PROTECTED]>: -- assignee: -> rhettinger nosy: +rhettinger __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bug

[issue2792] alternate fast builtin sum, rev'd

2008-05-08 Thread Jean Brouwers
Jean Brouwers <[EMAIL PROTECTED]> added the comment: Attached is a slightly better version, making the float loop cleaner. Use this one and disregard the earlier one, bltinmodule3.c.diff. /Jean Brouwers Added file: http://bugs.python.org/file10226/bltinmodule4.c.diff

[issue2792] alternate fast builtin sum, rev'd

2008-05-08 Thread Jean Brouwers
New submission from Jean Brouwers <[EMAIL PROTECTED]>: Here is one more, final attempt to improve fast summation, somewhat. This version inspects the type of both the sum and the first item and adds all ints and floats without any PyNumber_Add() call and in order. Also, the results for this te