[Python-Dev] Fwd: summing a bunch of numbers (or "whatevers")

Raymond Hettinger python@rcn.com
Mon, 21 Apr 2003 17:23:25 -0400

> For the C implementation, consider bypassing operator.add
> and calling the nb_add slot directly.  It's faster and fulfills
> the intention to avoid the alternative call to sq_concat.

Forget I said that, you still need PyNumber_Add() to
handle coercion and such.  Though without some
special casing  it's going to be darned difficult to match 
the performance of a pure python for-loop (especially
for a sequence of integers).

Raymond Hettinger