Skip to content

Instantly share code, notes, and snippets.

@higumachan
Last active January 21, 2017 01:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save higumachan/274b8f2a7a0b3f1b44dea35569c3451c to your computer and use it in GitHub Desktop.
Save higumachan/274b8f2a7a0b3f1b44dea35569c3451c to your computer and use it in GitHub Desktop.
from pyscalambda import _ as _1
from fn import _ as _2
from itertools import imap
import timeit
if __name__ == '__main__':
fnpy_time = timeit.timeit("map(_ + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1+ 1 + 1 + 1 + 1 + 1+ 1 + 1 + 1 + 1 + 1+ 1 + 1 + 1 + 1 + 1, xrange(1000))", setup="from fn import _", number=100)
pyscalambda_time = timeit.timeit("map(_ + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1+ 1 + 1 + 1 + 1 + 1+ 1 + 1 + 1 + 1 + 1+ 1 + 1 + 1 + 1 + 1, xrange(1000))", setup="from pyscalambda import _", number=100)
print("pyscalambda_time",pyscalambda_time)
print("fbpy_time", fnpy_time)
print(fnpy_time / pyscalambda_time)
@orisano
Copy link

orisano commented Jan 21, 2017

1-3行目が不要に見えます

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment