Message152410
> I was a little worried about the performance impact, so I did some
> trivial benchmarks:
> - O(depth) fwalk() is actually a tiny bit faster than walk() (it may
> be because we don't do as much path lookup)
> - O(1) fwalk() is around 20% slower, on a pure-traversal benchmark (so
> in a realistic use case where we would actually do something with the
> values returned by fwalk() the difference shouldn't be that
> noticeable)
I think the O(depth) version is fine. The O(1) version is quite more
complicated, difficult to follow, and it seems less robust (it doesn't
use try/finally and therefore might leak fds if the generator isn't
exhausted before being destroyed).
On modern systems you have at least 1024 fds, so the restriction
shouldn't be a problem. |
|
Date |
User |
Action |
Args |
2012-01-31 21:56:14 | pitrou | set | recipients:
+ pitrou, jcea, ncoghlan, tarek, neologix, rosslagerwall, hynek |
2012-01-31 21:56:14 | pitrou | link | issue13734 messages |
2012-01-31 21:56:14 | pitrou | create | |
|