May 12, 2006
2:27 p.m.
Hi Martijn, Martijn Faassen wrote:
It's probably more worthwhile to invest that energy in speeding up find by writing a native implementation. :)
Possibly. Although, well, I guess this is fast enough for now: # python -m timeit -s "from otbench import *" "bench_lxml_findall()" 10 loops, best of 3: 252 msec per loop # python -m timeit -s "from otbench import *" "bench_cET()" 10 loops, best of 3: 258 msec per loop :) Just for the records: cET 1.0.5 vs. lxml trunk, SVN 27133. (hint: I rewrote the ElementDepthFirstIterator returned by getiterator() to support tag-filtering directly.) Have fun, Stefan