Fredrik Lundh wrote:
>
> You should also benchmark this against code that uses the ordinary
> append/join pattern. (you've posted conflicting benchmarks for 2.5,
> but if I'm trusting the benchmarks that looks more reasonable, the
> standard implementation pattern is still around 10 times faster than
> your approach).
>
And the OP might like to go a bit further, and as well as benchmarking
this style:
array = []
array.append("aaa")
array.append("bbb")
etc
try benchmarking this ... well "style" may not be the appropriate word
:-)
array = []
arrapp = array.append
arrapp('aaa')
arrapp('bbb')
etc
Cheers,
John
--
http://mail.python.org/mailman/listinfo/python-list