summaryrefslogtreecommitdiff
path: root/benchmark/bench_objectify.py
diff options
context:
space:
mode:
authorscoder <none@none>2007-11-09 08:25:44 +0100
committerscoder <none@none>2007-11-09 08:25:44 +0100
commit278b62f0719a57ef8ffd774f063118a6fb504bed (patch)
tree95bf1b841dac057c44146b08d92a065a8c183e61 /benchmark/bench_objectify.py
parent7cec92f5045ff4688968bece6c2b23b8458cde50 (diff)
downloadpython-lxml-278b62f0719a57ef8ffd774f063118a6fb504bed.tar.gz
[svn r3048] benchmark on attribute assignment
--HG-- branch : trunk
Diffstat (limited to 'benchmark/bench_objectify.py')
-rw-r--r--benchmark/bench_objectify.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/benchmark/bench_objectify.py b/benchmark/bench_objectify.py
index b75234c1..a51f0931 100644
--- a/benchmark/bench_objectify.py
+++ b/benchmark/bench_objectify.py
@@ -26,6 +26,16 @@ class BenchMark(benchbase.BenchMarkBase):
for i in self.repeat3000:
root.zzzzz
+ def bench_attribute_assign_int(self, root):
+ "1 2 4"
+ for i in self.repeat3000:
+ root.XYZ = 5
+
+ def bench_attribute_assign_string(self, root):
+ "1 2 4"
+ for i in self.repeat3000:
+ root.XYZ = "5"
+
def bench_attribute_cached(self, root):
"1 2 4"
cache = root.zzzzz