Skip to content

Instantly share code, notes, and snippets.

@higumachan higumachan/vs1.py
Last active Jan 17, 2017

Embed
What would you like to do?
vs
from __future__ import print_function
import timeit
if __name__ == '__main__':
fnpy_time = timeit.timeit("map(_ + 1, xrange(1000))", setup="from fn import _", number=100)
pyscalambda_time = timeit.timeit("map(_ + 1, xrange(1000))", setup="from pyscalambda import _", number=100)
print("pyscalambda_time",pyscalambda_time)
print("fbpy_time", fnpy_time)
print(fnpy_time / pyscalambda_time)
@higumachan

This comment has been minimized.

Copy link
Owner Author

commented Jan 16, 2017

vs1.py output

(0.060153961181640625, 0.32550811767578125)
5.41124992073

vs2.py output

(0.27565693855285645, 9.234592914581299)
33.5003100704
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.