Changeset c12869e
- Timestamp:
- Jan 20, 2020, 12:46:37 PM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 26fd986, 5ee7d36
- Parents:
- f090750
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
benchmark/Makefile.am
rf090750 rc12869e 11 11 ## Created On : Sun May 31 09:08:15 2015 12 12 ## Last Modified By : Peter A. Buhr 13 ## Last Modified On : Sun Jan 19 12:55:02202014 ## Update Count : 2 3213 ## Last Modified On : Mon Jan 20 11:50:13 2020 14 ## Update Count : 244 15 15 ############################################################################### 16 16 … … 56 56 STATS = ${abs_top_srcdir}/tools/stat.py 57 57 # NEED AT LEAST 4 DATA VALUES FOR BENCHMARKS BECAUSE THE MAX AND MIN VALUES ARE REMOVED 58 repeats = 5# 31 for benchmarks58 repeats = 13 # 31 for benchmarks 59 59 arch = x64 60 60 skipcompile = no … … 114 114 echo "------------------------------------------------------" 115 115 echo $< 116 ${REPEAT} ${repeats} -- /usr/bin/time -f "%Uu %Ss %Er %Mkb"./a.out\116 ${REPEAT} ${repeats} -- ./a.out\ 117 117 $(if ${$(subst -,_,$(basename $@))_DURATION},\ 118 118 ${$(subst -,_,$(basename $@))_DURATION},\ … … 121 121 echo "------------------------------------------------------" 122 122 rm -f a.out .result.log *.class 123 124 # ${REPEAT} ${repeats} -- /usr/bin/time -f "%Uu %Ss %Er %Mkb" ./a.out 123 125 124 126 %.runquiet : … … 237 239 238 240 CTXSWITCH_DEPEND = \ 239 ctxswitch-pthread.run \240 241 ctxswitch-cfa_generator.run \ 241 242 ctxswitch-cfa_coroutine.run \ … … 244 245 ctxswitch-upp_coroutine.run \ 245 246 ctxswitch-upp_thread.run \ 246 ctxswitch-goroutine.run \ 247 ctxswitch-python_coroutine.run \ 248 ctxswitch-nodejs_coroutine.run \ 249 ctxswitch-goroutine_thread.run \ 247 250 ctxswitch-rust_thread.run \ 248 251 ctxswitch-nodejs_coroutine.run \ 249 ctxswitch-java_thread.run 252 ctxswitch-java_thread.run \ 253 ctxswitch-pthread.run 250 254 251 255 if WITH_LIBFIBRE … … 263 267 ctxswitch$(EXEEXT): $(CTXSWITCH_DEPEND) 264 268 269 ctxswitch-cfa_generator$(EXEEXT): 270 $(BENCH_V_CFA)$(CFACOMPILE) $(srcdir)/ctxswitch/cfa_gen.cfa 271 272 ctxswitch-cfa_coroutine$(EXEEXT): 273 $(BENCH_V_CFA)$(CFACOMPILE) $(srcdir)/ctxswitch/cfa_cor.cfa 274 275 ctxswitch-cfa_thread$(EXEEXT): 276 $(BENCH_V_CFA)$(CFACOMPILE) $(srcdir)/ctxswitch/cfa_thrd.cfa 277 278 ctxswitch-cfa_thread2$(EXEEXT): 279 $(BENCH_V_CFA)$(CFACOMPILE) $(srcdir)/ctxswitch/cfa_thrd2.cfa 280 281 ctxswitch-upp_coroutine$(EXEEXT): 282 $(BENCH_V_UPP)$(UPPCOMPILE) $(srcdir)/ctxswitch/upp_cor.cc 283 284 ctxswitch-upp_thread$(EXEEXT): 285 $(BENCH_V_UPP)$(UPPCOMPILE) $(srcdir)/ctxswitch/upp_thrd.cc 286 287 ctxswitch-python_coroutine$(EXEEXT): 288 echo "#!/bin/sh" > a.out 289 echo "python3.7 $(srcdir)/ctxswitch/python_cor.py" >> a.out 290 chmod a+x a.out 291 292 ctxswitch-nodejs_coroutine$(EXEEXT): 293 echo "#!/bin/sh" > a.out 294 echo "nodejs $(srcdir)/ctxswitch/node_cor.js" >> a.out 295 chmod a+x a.out 296 297 ctxswitch-goroutine_thread$(EXEEXT): 298 $(BENCH_V_GOC)go build -o a.out $(srcdir)/ctxswitch/goroutine.go 299 300 ctxswitch-rust_thread$(EXEEXT): 301 $(BENCH_V_RUSTC)rustc -C opt-level=3 -o a.out $(srcdir)/ctxswitch/rust_thrd.rs 302 303 ctxswitch-java_thread$(EXEEXT): 304 $(BENCH_V_JAVAC)javac -d $(builddir) $(srcdir)/ctxswitch/JavaThread.java 305 echo "#!/bin/sh" > a.out 306 echo "java JavaThread" >> a.out 307 chmod a+x a.out 308 265 309 ctxswitch-pthread$(EXEEXT): 266 310 $(BENCH_V_CC)$(COMPILE) $(srcdir)/ctxswitch/pthreads.c 267 311 268 ctxswitch-cfa_generator$(EXEEXT):269 $(BENCH_V_CFA)$(CFACOMPILE) $(srcdir)/ctxswitch/cfa_gen.cfa270 271 ctxswitch-cfa_coroutine$(EXEEXT):272 $(BENCH_V_CFA)$(CFACOMPILE) $(srcdir)/ctxswitch/cfa_cor.cfa273 274 ctxswitch-cfa_thread$(EXEEXT):275 $(BENCH_V_CFA)$(CFACOMPILE) $(srcdir)/ctxswitch/cfa_thrd.cfa276 277 ctxswitch-cfa_thread2$(EXEEXT):278 $(BENCH_V_CFA)$(CFACOMPILE) $(srcdir)/ctxswitch/cfa_thrd2.cfa279 280 ctxswitch-upp_coroutine$(EXEEXT):281 $(BENCH_V_UPP)$(UPPCOMPILE) $(srcdir)/ctxswitch/upp_cor.cc282 283 ctxswitch-upp_thread$(EXEEXT):284 $(BENCH_V_UPP)$(UPPCOMPILE) $(srcdir)/ctxswitch/upp_thrd.cc285 286 ctxswitch-goroutine$(EXEEXT):287 $(BENCH_V_GOC)go build -o a.out $(srcdir)/ctxswitch/goroutine.go288 289 ctxswitch-rust_thread$(EXEEXT):290 $(BENCH_V_RUSTC)rustc -C opt-level=3 -o a.out $(srcdir)/ctxswitch/rust_thrd.rs291 292 ctxswitch-nodejs_coroutine$(EXEEXT):293 echo "#!/bin/sh" > a.out294 echo "nodejs $(srcdir)/ctxswitch/node_cor.js" >> a.out295 chmod a+x a.out296 297 ctxswitch-java_thread$(EXEEXT):298 $(BENCH_V_JAVAC)javac -d $(builddir) $(srcdir)/ctxswitch/JavaThread.java299 echo "#!/bin/sh" > a.out300 echo "java JavaThread" >> a.out301 chmod a+x a.out302 303 312 ## ========================================================================================================= 304 313 305 314 mutex$(EXEEXT) : \ 306 mutex-pthread.run \307 315 mutex-cfa1.run \ 308 316 mutex-cfa2.run \ … … 311 319 mutex-go.run \ 312 320 mutex-rust.run \ 313 mutex-java.run 321 mutex-java.run \ 322 mutex-pthread.run 314 323 315 324 mutex-pthread$(EXEEXT): … … 343 352 344 353 signal$(EXEEXT) : \ 345 signal-pthread.run \346 signal-upp.run \347 354 signal-cfa1.run \ 348 355 signal-cfa2.run \ 349 356 signal-cfa4.run \ 357 signal-upp.run \ 350 358 signal-rust.run \ 351 signal-java.run 359 signal-java.run \ 360 signal-pthread.run 352 361 353 362 signal-pthread$(EXEEXT): … … 378 387 379 388 waitfor$(EXEEXT) : \ 380 waitfor-upp.run \381 389 waitfor-cfa1.run \ 382 390 waitfor-cfa2.run \ 383 waitfor-cfa4.run 391 waitfor-cfa4.run \ 392 waitfor-upp.run 384 393 385 394 waitfor-upp$(EXEEXT): … … 398 407 399 408 creation$(EXEEXT) : \ 400 creation-pthread.run \401 409 creation-cfa_coroutine.run \ 402 410 creation-cfa_coroutine_eager.run \ … … 404 412 creation-upp_coroutine.run \ 405 413 creation-upp_thread.run \ 406 creation-goroutine.run \ 407 creation-rust.run \ 414 creation-python_coroutine.run \ 408 415 creation-nodejs_coroutine.run \ 409 creation-java.run 416 creation-goroutine_thread.run \ 417 creation-rust_thread.run \ 418 creation-java_thread.run \ 419 creation-pthread.run 410 420 411 421 creation-cfa_coroutine$(EXEEXT): … … 424 434 $(BENCH_V_UPP)$(UPPCOMPILE) $(srcdir)/creation/upp_thrd.cc 425 435 436 creation-python_coroutine$(EXEEXT): 437 echo "#!/bin/sh" > a.out 438 echo "python3.7 $(srcdir)/creation/python_cor.py" >> a.out 439 chmod a+x a.out 440 441 creation-nodejs_coroutine$(EXEEXT): 442 echo "#!/bin/sh" > a.out 443 echo "nodejs $(srcdir)/creation/node_cor.js" >> a.out 444 chmod a+x a.out 445 446 creation-goroutine_thread$(EXEEXT): 447 $(BENCH_V_GOC)go build -o a.out $(srcdir)/creation/goroutine.go 448 449 creation-rust_thread$(EXEEXT): 450 $(BENCH_V_RUSTC)rustc -C opt-level=3 -o a.out $(srcdir)/creation/rust_thrd.rs 451 452 creation-java$(EXEEXT): 453 $(BENCH_V_JAVAC)javac -d $(builddir) $(srcdir)/creation/JavaThread.java 454 echo "#!/bin/sh" > a.out 455 echo "java JavaThread" >> a.out 456 chmod a+x a.out 457 426 458 creation-pthread$(EXEEXT): 427 459 $(BENCH_V_CC)$(COMPILE) $(srcdir)/creation/pthreads.c 428 429 creation-goroutine$(EXEEXT):430 $(BENCH_V_GOC)go build -o a.out $(srcdir)/creation/goroutine.go431 432 creation-rust$(EXEEXT):433 $(BENCH_V_RUSTC)rustc -C opt-level=3 -o a.out $(srcdir)/creation/rust_thrd.rs434 435 creation-nodejs_coroutine$(EXEEXT):436 echo "#!/bin/sh" > a.out437 echo "nodejs $(srcdir)/creation/node_cor.js" >> a.out438 chmod a+x a.out439 440 creation-java$(EXEEXT):441 $(BENCH_V_JAVAC)javac -d $(builddir) $(srcdir)/creation/JavaThread.java442 echo "#!/bin/sh" > a.out443 echo "java JavaThread" >> a.out444 chmod a+x a.out445 460 446 461 ## ========================================================================================================= -
benchmark/Makefile.in
rf090750 rc12869e 413 413 STATS = ${abs_top_srcdir}/tools/stat.py 414 414 # NEED AT LEAST 4 DATA VALUES FOR BENCHMARKS BECAUSE THE MAX AND MIN VALUES ARE REMOVED 415 repeats = 5# 31 for benchmarks415 repeats = 13 # 31 for benchmarks 416 416 arch = x64 417 417 skipcompile = no … … 450 450 basic-tls-fetch_add.run 451 451 452 CTXSWITCH_DEPEND = ctxswitch- pthread.run ctxswitch-cfa_generator.run \452 CTXSWITCH_DEPEND = ctxswitch-cfa_generator.run \ 453 453 ctxswitch-cfa_coroutine.run ctxswitch-cfa_thread.run \ 454 454 ctxswitch-cfa_thread2.run ctxswitch-upp_coroutine.run \ 455 ctxswitch-upp_thread.run ctxswitch-goroutine.run \ 455 ctxswitch-upp_thread.run ctxswitch-python_coroutine.run \ 456 ctxswitch-nodejs_coroutine.run ctxswitch-goroutine_thread.run \ 456 457 ctxswitch-rust_thread.run ctxswitch-nodejs_coroutine.run \ 457 ctxswitch-java_thread.run $(am__append_1) 458 ctxswitch-java_thread.run ctxswitch-pthread.run \ 459 $(am__append_1) 458 460 testdir = $(top_srcdir)/tests 459 461 all: all-am … … 790 792 echo "------------------------------------------------------" 791 793 echo $< 792 ${REPEAT} ${repeats} -- /usr/bin/time -f "%Uu %Ss %Er %Mkb"./a.out\794 ${REPEAT} ${repeats} -- ./a.out\ 793 795 $(if ${$(subst -,_,$(basename $@))_DURATION},\ 794 796 ${$(subst -,_,$(basename $@))_DURATION},\ … … 797 799 echo "------------------------------------------------------" 798 800 rm -f a.out .result.log *.class 801 802 # ${REPEAT} ${repeats} -- /usr/bin/time -f "%Uu %Ss %Er %Mkb" ./a.out 799 803 800 804 %.runquiet : … … 905 909 ctxswitch$(EXEEXT): $(CTXSWITCH_DEPEND) 906 910 907 ctxswitch-pthread$(EXEEXT):908 $(BENCH_V_CC)$(COMPILE) $(srcdir)/ctxswitch/pthreads.c909 910 911 ctxswitch-cfa_generator$(EXEEXT): 911 912 $(BENCH_V_CFA)$(CFACOMPILE) $(srcdir)/ctxswitch/cfa_gen.cfa … … 926 927 $(BENCH_V_UPP)$(UPPCOMPILE) $(srcdir)/ctxswitch/upp_thrd.cc 927 928 928 ctxswitch-goroutine$(EXEEXT): 929 $(BENCH_V_GOC)go build -o a.out $(srcdir)/ctxswitch/goroutine.go 930 931 ctxswitch-rust_thread$(EXEEXT): 932 $(BENCH_V_RUSTC)rustc -C opt-level=3 -o a.out $(srcdir)/ctxswitch/rust_thrd.rs 929 ctxswitch-python_coroutine$(EXEEXT): 930 echo "#!/bin/sh" > a.out 931 echo "python3.7 $(srcdir)/ctxswitch/python_cor.py" >> a.out 932 chmod a+x a.out 933 933 934 934 ctxswitch-nodejs_coroutine$(EXEEXT): … … 936 936 echo "nodejs $(srcdir)/ctxswitch/node_cor.js" >> a.out 937 937 chmod a+x a.out 938 939 ctxswitch-goroutine_thread$(EXEEXT): 940 $(BENCH_V_GOC)go build -o a.out $(srcdir)/ctxswitch/goroutine.go 941 942 ctxswitch-rust_thread$(EXEEXT): 943 $(BENCH_V_RUSTC)rustc -C opt-level=3 -o a.out $(srcdir)/ctxswitch/rust_thrd.rs 938 944 939 945 ctxswitch-java_thread$(EXEEXT): … … 943 949 chmod a+x a.out 944 950 951 ctxswitch-pthread$(EXEEXT): 952 $(BENCH_V_CC)$(COMPILE) $(srcdir)/ctxswitch/pthreads.c 953 945 954 mutex$(EXEEXT) : \ 946 mutex-pthread.run \947 955 mutex-cfa1.run \ 948 956 mutex-cfa2.run \ … … 951 959 mutex-go.run \ 952 960 mutex-rust.run \ 953 mutex-java.run 961 mutex-java.run \ 962 mutex-pthread.run 954 963 955 964 mutex-pthread$(EXEEXT): … … 981 990 982 991 signal$(EXEEXT) : \ 983 signal-pthread.run \984 signal-upp.run \985 992 signal-cfa1.run \ 986 993 signal-cfa2.run \ 987 994 signal-cfa4.run \ 995 signal-upp.run \ 988 996 signal-rust.run \ 989 signal-java.run 997 signal-java.run \ 998 signal-pthread.run 990 999 991 1000 signal-pthread$(EXEEXT): … … 1014 1023 1015 1024 waitfor$(EXEEXT) : \ 1016 waitfor-upp.run \1017 1025 waitfor-cfa1.run \ 1018 1026 waitfor-cfa2.run \ 1019 waitfor-cfa4.run 1027 waitfor-cfa4.run \ 1028 waitfor-upp.run 1020 1029 1021 1030 waitfor-upp$(EXEEXT): … … 1032 1041 1033 1042 creation$(EXEEXT) : \ 1034 creation-pthread.run \1035 1043 creation-cfa_coroutine.run \ 1036 1044 creation-cfa_coroutine_eager.run \ … … 1038 1046 creation-upp_coroutine.run \ 1039 1047 creation-upp_thread.run \ 1040 creation-goroutine.run \ 1041 creation-rust.run \ 1048 creation-python_coroutine.run \ 1042 1049 creation-nodejs_coroutine.run \ 1043 creation-java.run 1050 creation-goroutine_thread.run \ 1051 creation-rust_thread.run \ 1052 creation-java_thread.run \ 1053 creation-pthread.run 1044 1054 1045 1055 creation-cfa_coroutine$(EXEEXT): … … 1058 1068 $(BENCH_V_UPP)$(UPPCOMPILE) $(srcdir)/creation/upp_thrd.cc 1059 1069 1060 creation-pthread$(EXEEXT): 1061 $(BENCH_V_CC)$(COMPILE) $(srcdir)/creation/pthreads.c 1062 1063 creation-goroutine$(EXEEXT): 1064 $(BENCH_V_GOC)go build -o a.out $(srcdir)/creation/goroutine.go 1065 1066 creation-rust$(EXEEXT): 1067 $(BENCH_V_RUSTC)rustc -C opt-level=3 -o a.out $(srcdir)/creation/rust_thrd.rs 1070 creation-python_coroutine$(EXEEXT): 1071 echo "#!/bin/sh" > a.out 1072 echo "python3.7 $(srcdir)/creation/python_cor.py" >> a.out 1073 chmod a+x a.out 1068 1074 1069 1075 creation-nodejs_coroutine$(EXEEXT): … … 1071 1077 echo "nodejs $(srcdir)/creation/node_cor.js" >> a.out 1072 1078 chmod a+x a.out 1079 1080 creation-goroutine_thread$(EXEEXT): 1081 $(BENCH_V_GOC)go build -o a.out $(srcdir)/creation/goroutine.go 1082 1083 creation-rust_thread$(EXEEXT): 1084 $(BENCH_V_RUSTC)rustc -C opt-level=3 -o a.out $(srcdir)/creation/rust_thrd.rs 1073 1085 1074 1086 creation-java$(EXEEXT): … … 1077 1089 echo "java JavaThread" >> a.out 1078 1090 chmod a+x a.out 1091 1092 creation-pthread$(EXEEXT): 1093 $(BENCH_V_CC)$(COMPILE) $(srcdir)/creation/pthreads.c 1079 1094 1080 1095 compile$(EXEEXT) : \ -
benchmark/creation/node_cor.js
rf090750 rc12869e 4 4 if ( argc == 3 ) times = Number( process.argv[2] ) 5 5 6 function * coroutine() { }6 function * coroutine() { yield } 7 7 var hrstart = process.hrtime() 8 8 for ( var i = 0; i < times; i += 1 ) { … … 15 15 // Local Variables: // 16 16 // tab-width: 4 // 17 // compile-command: "node node_cor.js" //17 // compile-command: "nodejs node_cor.js" // 18 18 // End: // -
benchmark/creation/upp_cor.cc
rf090750 rc12869e 5 5 _Coroutine MyCor { 6 6 void main() {} 7 public: 8 MyCor() { resume(); } 7 9 }; 8 10 -
benchmark/ctxswitch/node_cor.js
rf090750 rc12869e 21 21 // Local Variables: // 22 22 // tab-width: 4 // 23 // compile-command: "node node_cor.js" //23 // compile-command: "nodejs node_cor.js" // 24 24 // End: // -
tools/stat.py
rf090750 rc12869e 17 17 avg = numpy.mean (content) 18 18 std = numpy.std (content) 19 print "median {0:.1f} avg {1:.1f} stddev {2:. 2f}".format( med, avg, std )19 print "median {0:.1f} avg {1:.1f} stddev {2:.1f}".format( med, avg, std ) 20 20 21 21
Note: See TracChangeset
for help on using the changeset viewer.