[Lxml-checkins] r48460 - lxml/trunk/benchmark

scoder at codespeak.net scoder at codespeak.net
Fri Nov 9 08:25:45 CET 2007


Author: scoder
Date: Fri Nov  9 08:25:44 2007
New Revision: 48460

Modified:
   lxml/trunk/benchmark/bench_objectify.py
Log:
benchmark on attribute assignment

Modified: lxml/trunk/benchmark/bench_objectify.py
==============================================================================
--- lxml/trunk/benchmark/bench_objectify.py	(original)
+++ lxml/trunk/benchmark/bench_objectify.py	Fri Nov  9 08:25:44 2007
@@ -26,6 +26,16 @@
         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


More information about the lxml-checkins mailing list