import timeit import struct from struct import unpack def f(x, unpack=struct.unpack): return unpack('