[MERGE][bug #297831] don't call chdir('')

Andrew Bennetts andrew.bennetts at canonical.com
Wed Nov 19 21:38:57 GMT 2008


John Arbash Meinel wrote:
> Aaron Bentley wrote:
[...]
> > If you can demonstrate that this has a significant impact on
> > performance, I'll let it in as-is.
> > 
> > Aaron
> > 
> 
> $ TIMEIT -s 'x = ""' 'if x != "": pass'
> 10000000 loops, best of 3: 0.0675 usec per loop
> and
> $ TIMEIT -s 'x = "this/is/a/longer/path"' 'if x != "": pass'
> 10000000 loops, best of 3: 0.0631 usec per loop

(etc.)

Is this an accurate way to measure the performance impact of the change
being discussed?  Your patch makes the change in a .pyx file, which works
rather differently to a .py file.

-Andrew.




More information about the bazaar mailing list