Created
May 19, 2015 15:42
-
-
Save danner/9c5443103e4b43fee2cc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In [10]: timeit.timeit("json.dumps(cmm_sig, separators=(',', ':'))", setup='from zapprx.utils import signatureConverter as s; cmm_sig = s.signaturePad_to_cmm(s.in_sig); import json', number=10000) | |
Out[10]: 0.5381269454956055 | |
In [11]: timeit.timeit("'[{}]'.format(','.join(['[{},{},{}]'.format(l[0], l[1], l[2]) for l in cmm_sig]))", setup='from zapprx.utils import signatureConverter as s; cmm_sig = s.signaturePad_to_cmm(s.in_sig)', number=10000) | |
Out[11]: 0.8120849132537842 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment