PATCH: Speed up direct string concatenation by 20+%!

Felipe Almeida Lessa felipe.lessa at gmail.com
Fri Sep 29 11:40:49 CEST 2006


28 Sep 2006 19:07:23 -0700, Larry Hastings <larry at hastings.org>:
> THE BENCHMARKS
>
> Benchmark 1:
>         def add(a, b, c, ... t): return a + b + c + ... + t
>         for i in range(10000000): add("aaa", "bbb", "ccc", ..., "ttt")
[snip]

What about "a + b"? Or "a + b + c"? Does it have a large overhead on
small string concatenations?

-- 
Felipe.



More information about the Python-list mailing list