8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5cfa49b 8000 commit 6948dd5Copy full SHA for 6948dd5
benchmark/benchmark.py
@@ -15,10 +15,12 @@ def profile(name, func):
15
16
def simple(name, data):
17
if has_ext:
18
- profile("packing %s (ext)" % name, lambda: _packer.packb(data))
19
- profile('packing %s (fallback)' % name, lambda: fallback.packb(data))
+ packer = _packer.Packer()
+ profile("packing %s (ext)" % name, lambda: packer.pack(data))
20
+ packer = fallback.Packer()
21
+ profile('packing %s (fallback)' % name, lambda: packer.pack(data))
22
- data = fallback.packb(data)
23
+ data = packer.pack(data)
24
25
profile('unpacking %s (ext)' % name, lambda: _unpacker.unpackb(data))
26
profile('unpacking %s (fallback)' % name, lambda: fallback.unpackb(data))
0 commit comments