forked from geohot/mergesorts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.sh
executable file
·96 lines (65 loc) · 2.41 KB
/
run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#!/bin/bash
start=`date +%s`
printf "\nRunning the C version : \n"
rm -f a.out && gcc mergesort.c && ./a.out && rm -f a.out
printf "\nRunning the Python version : \n"
python3 mergesort.py
printf "\nRunning the Haskell version : \n"
rm -f mergesort && ghc mergesort.hs && ./mergesort
printf "\nRunning the Rust version : \n"
rm -f mergesort && rustc mergesort.rs && ./mergesort
printf "\nRunning the Java version : \n"
rm -f mergesort && javac mergesort.java && java mergesort
printf "\nRunning the Javascript version : \n"
node mergesort.js
printf "\nRunning the PHP version : \n"
php mergesort.php
printf "\nRunning the Scala version : \n"
scala -nc mergesort.scala
printf "\nRunning the C++ version : \n"
g++ -std=c++17 mergesort.cpp && ./a.out && rm -f a.out
printf "\nRunning the Julia version : \n"
julia mergesort.jl
printf "\nRunning the Perl version : \n"
perl mergesort.pl
printf "\nRunning the Go version : \n"
rm -f mergesort && go build mergesort.go && ./mergesort
printf "\nRunning the OCaml version : \n"
rm -f mergesort && ocamlc mergesort.ml -o mergesort && ./mergesort
printf "\nRunning the Bash version : \n"
bash mergesort.sh
printf "\nRunning the C# version : \n"
mcs -out:mergesort.exe mergesort.cs && mono mergesort.exe
printf "\nRunning the Kotlin version : \n"
kotlinc mergesort.kt -include-runtime -d mergesort.jar && java -jar mergesort.jar
printf "\nRunning the Prolog version : \n"
rm -f mergesort && swipl -g main --stand_alone=true -o mergesort -c mergesort.pro && ./mergesort
printf "\nRunning the J version : \n"
ijconsole mergesort.ijs
printf "\nRunning the Scheme version : \n"
scheme --script mergesort.ss
printf "\nRunning the Ruby version : \n"
ruby mergesort.rb
printf "\nRunning the R version : \n"
Rscript mergesort.r
printf "\nRunning the Elixir version : \n"
elixir mergesort.exs
printf "\nRunning the Dart Version : \n"
dart mergesort.dart
printf "\nRunning the Coq Version : \n"
coqc mergesort.v
printf "\nRunning the LUA Version : \n"
lua5.3 mergesort.lua
printf "\nRunning the TypeScript version : \n"
tsc mergesort.ts --outDir out && node mergesort.js
printf "\nRunning the Coffeescript version : \n"
coffee mergesort.coffee
printf "\nRunning the Swift version : \n"
swift mergesort.swift
printf "\nRunning the F# version : \n"
dotnet fsi mergesort.fsx
printf "\nRunning the ATS version : \n"
myatscc mergesort.dats && ./mergesort_dats
end=`date +%s`
runtime=$((end-start))
echo "$runtime"