advertisement

Weblog:   The Python comunity has too many deceptive XML benchmarks
Subject:   Calming down...
Date:   2005-01-27 11:17:49
From:   Cito
Sorry for interfering, but somehow I feel it is highly ironic that both parties can parse the whole Bible so quickly, but both parties have extreme difficulties to apply Biblical standards of dealing with each other. Maybe both of you should slow down a little bit and invest some time in improving your EQ skills instead of your programming skills.


I really would like to see both parties calming down, admitting mistakes (not only those of technical nature) and reconcile. You are eminently respected in the Python community and usually great contributors and your reputation can only grow if you could bring yourself to do this.


Concerning the factual issue, what do you think of the following benchmark? Anything wrong with it?


def TestElementTree(ElementTree):
tree = ElementTree.parse(
'religion.2.00.xml/ot/ot.xml')
for text in (v.text for v in tree.findall("//v")
if v.text.find(u'begat') != -1):
dummy = text


def TestAmara(binderytools):
for text in (unicode(v) for v in
binderytools.pushbind(u'v',
source='religion.2.00.xml/ot/ot.xml')
if unicode(v).find(u'begat') != -1):
dummy = text


from timeit import Timer


print "cElementTree:",
t = Timer('TestElementTree(ElementTree2)',
'import cElementTree as ElementTree2;'
'from __main__ import TestElementTree')
print t.timeit(100)/100


print "ElementTree:",
t = Timer('TestElementTree(ElementTree)',
'from elementtree import ElementTree;'
'from __main__ import TestElementTree')
print t.timeit(20)/20


print "Amara:",
t = Timer('TestAmara(binderytools)',
'from amara import binderytools;'
'from __main__ import TestAmara')
print t.timeit(3)/3

Full Threads Oldest First

Showing messages 1 through 1 of 1.

  • Calming down...
    2005-01-27 11:52:49  Cito [Reply | View]

    Found some good advices in ot.xml:

    "Just balances, just weights, a just ephah, and a just hin, shall ye have"

    "A soft answer turneth away wrath: but grievous words stir up anger."

    "The beginning of strife is as when one letteth out water: therefore leave off contention, before it be meddled with."

    "A brother offended is harder to be won than a strong city: and their contentions are like the bars of a castle."

    And here is one for me:

    "He that passeth by, and meddleth with strife belonging not to him, is like one that taketh a dog by the ears."

Showing messages 1 through 1 of 1.