Message46259
Logged In: YES
user_id=80475
I recommend doing both. When and where the optimization
applies is an implementation detail (that probably won't be
replicated in Jython for example).
To do only inplace add is to miss much of the existing code
that is in need of help. Several library modules and
benchmarks benefit greatly from doing both. This makes
common coding styles not result in disasterous performance.
The explanation can read something like:
"With binary additions of the form a+=b or a=a+b, CPython is
able to concatenate inplace and achieve linear running time.
However, with chained additions like a = a + b + c, the
current implementation does not recognize the opportunity to
concatenate inplace. Instead, a new string is constructed
at each step resulting in quadratic running time."
|
|
Date |
User |
Action |
Args |
2007-08-23 15:38:22 | admin | link | issue980695 messages |
2007-08-23 15:38:22 | admin | create | |
|