diff options
author | Stefan Behnel <stefan_ml@behnel.de> | 2013-04-06 18:08:31 +0200 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2013-04-06 18:08:31 +0200 |
commit | 3ada91ef74d2d5db8749cd20744d7e702fda691e (patch) | |
tree | 51a3a4a8144066323d06b2f1aeb60869ee4fddab | |
parent | b43261d2f5912fb0ef08a786c31b90f1523b54db (diff) | |
download | python-lxml-3ada91ef74d2d5db8749cd20744d7e702fda691e.tar.gz |
add benchmark for throw-away iteration for searching a specific tag
-rw-r--r-- | benchmark/bench_etree.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/benchmark/bench_etree.py b/benchmark/bench_etree.py index 8d4eb4b2..1e4c0f77 100644 --- a/benchmark/bench_etree.py +++ b/benchmark/bench_etree.py @@ -357,6 +357,10 @@ class BenchMark(benchbase.TreeBenchMark): list(root.iter(self.SEARCH_TAG)) @nochange + def bench_iter_tag_one_at_a_time(self, root): + list(islice(root.iter(self.SEARCH_TAG), 2**30, None)) + + @nochange def bench_iter_tag_none(self, root): list(root.iter("{ThisShould}NeverExist")) |