[Lxml-checkins] r51038 - in lxml/trunk: . benchmark
scoder at codespeak.net
scoder at codespeak.net
Fri Jan 25 18:21:56 CET 2008
Author: scoder
Date: Fri Jan 25 18:21:55 2008
New Revision: 51038
Modified:
lxml/trunk/ (props changed)
lxml/trunk/benchmark/bench_etree.py
Log:
r3322 at delle: sbehnel | 2008-01-25 18:21:09 +0100
benchmark to compare findall() and xpath()
Modified: lxml/trunk/benchmark/bench_etree.py
==============================================================================
--- lxml/trunk/benchmark/bench_etree.py (original)
+++ lxml/trunk/benchmark/bench_etree.py Fri Jan 25 18:21:55 2008
@@ -312,6 +312,12 @@
root.findall(".//*[%s]/./%s/./*" % (self.SEARCH_TAG, self.SEARCH_TAG))
@onlylib('lxe')
+ def bench_xpath_path(self, root):
+ ns, tag = self.SEARCH_TAG[1:].split('}')
+ root.xpath(".//*[p:%s]/./p:%s/./*" % (tag,tag),
+ namespaces = {'p':ns})
+
+ @onlylib('lxe')
def bench_iterfind(self, root):
list(root.iterfind(".//*"))
More information about the lxml-checkins
mailing list