forked from Bobo1239/meetup_benchmark
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·34 lines (27 loc) · 861 Bytes
/
run.sh
File metadata and controls
executable file
·34 lines (27 loc) · 861 Bytes
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
#!/bin/bash
RUST_FLAGS="--release"
function print_filesize {
size=$(expr $(stat $1 --printf="%s") / 1024)
echo "Size: $size Kb"
}
echo "Building Rust version..."
rustc -Vv
( cd rust; cargo build $RUST_FLAGS )
print_filesize "./rust/target/release/rust"
echo
echo "Building D (dmd) version..."
docker run -ti dlanguage/dmd dmd --version | head -n 1
( cd d; docker run -v $(pwd):/work -w /work dlanguage/dmd dmd -O -release -inline -of=prog_dmd prog.d )
print_filesize "d/prog_dmd"
echo
echo "Building D (ldc) version..."
docker run -ti dlanguage/ldc ldc2 --version | head -n 1
( cd d; docker run -v $(pwd):/work -w /work dlanguage/ldc ldc2 -O3 -release -of=prog_ldc prog.d )
print_filesize "d/prog_ldc"
echo
echo "Building AWK ^^ version..."
awk --version | head -n 1
print_filesize "awk/prog.sh"
echo
echo "Benching..."
( cd bench; cargo bench )