source: benchmark/creation/python_cor.py@ 6136ecc

ADT arm-eh ast-experimental enum forall-pointer-decay jacob/cs343-translation new-ast new-ast-unique-expr pthread-emulation qualifiedEnum
Last change on this file since 6136ecc was c12869e, checked in by Peter A. Buhr <pabuhr@…>, 6 years ago

update benchmarks for concurrency paper

  • Property mode set to 100644
File size: 380 bytes
Line 
1import sys
2import time
3
4times = 50000000
5argc = len( sys.argv )
6if argc > 2:
7 sys.exit( 1 )
8if argc == 2:
9 times = int( sys.argv[1] )
10
11def C():
12 yield
13
14start = time.time_ns()
15for i in range( 10000000 ):
16 c = C()
17 next( c ) # resume
18end = time.time_ns()
19print( (end - start) / times )
20
21# Local Variables: #
22# tab-width: 4 #
23# compile-command: "python3.7 python_cor.py" #
24# End: #
Note: See TracBrowser for help on using the repository browser.