On 5 Sep, 07:04, Steven D'Aprano <st...@remove-this- cybersource.com.au> wrote:
> Your code does a lot of unnecessary work if you're just trying to > demonstrate immutability is faster or slower than mutability. No ... I was trying to compute D4 wavelet transforms. I wanted to see how NumPy compared with Matlab. > How does Matlab speed compare to Python in general? Matlab is an example of a language that only has immutable types. While it works well if you only play with small arrays, it is horrible for complex data structures. Also consider that appending to an array in Matlab always becomes O (n**2), as the array cannot mutate like Python lists. Thus it is impossible to amortize to linear complexity. -- http://mail.python.org/mailman/listinfo/python-list