summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--benchmark/benchmark.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/benchmark/benchmark.py b/benchmark/benchmark.py
index 1439289..80819c6 100644
--- a/benchmark/benchmark.py
+++ b/benchmark/benchmark.py
@@ -15,10 +15,12 @@ def profile(name, func):
def simple(name, data):
if has_ext:
- profile("packing %s (ext)" % name, lambda: _packer.packb(data))
- profile('packing %s (fallback)' % name, lambda: fallback.packb(data))
+ packer = _packer.Packer()
+ profile("packing %s (ext)" % name, lambda: packer.pack(data))
+ packer = fallback.Packer()
+ profile('packing %s (fallback)' % name, lambda: packer.pack(data))
- data = fallback.packb(data)
+ data = packer.pack(data)
if has_ext:
profile('unpacking %s (ext)' % name, lambda: _unpacker.unpackb(data))
profile('unpacking %s (fallback)' % name, lambda: fallback.unpackb(data))