Skip to content

Commit

Permalink
Fixed benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
JeneLitsch committed Mar 5, 2022
1 parent a81c5ee commit ec3ff2f
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 13 deletions.
Empty file removed asmFile
Empty file.
2 changes: 1 addition & 1 deletion benchmark/array.ltn
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ function main() {
for i (0, 1000000) {
var a = [1,2,3,4,5,6,7,8,9];
}
std::println(std::to_seconds(clock) + "s");
std::println(std::string(std::to_seconds(clock)) + "s");
var a = [1,2,3,4,5,6,7,8,9];
std::println(a);
}
2 changes: 1 addition & 1 deletion benchmark/fx.ltn
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ function f(a, b, c) {
function main() {
var clock = std::clock();
for i (0, 5000000) f(1, 2, 3);
std::println(std::to_seconds(clock) + "s");
std::println(std::string(std::to_seconds(clock)) + "s");
}
4 changes: 2 additions & 2 deletions benchmark/member.ltn
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ function main() {
foo.a = 0;
for i (0, 1000000) {
foo.b = 1;
foo.b = std::null();
foo.b = null;
foo.a += 1;
}
std::println(std::to_seconds(clock) + "s");
std::println(std::string(std::to_seconds(clock)) + "s");
}
2 changes: 1 addition & 1 deletion benchmark/memory.ltn
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ function main() {
for i (0, 10000000) {
var y = x;
}
std::println(std::to_seconds(clock) + "s");
std::println(std::string(std::to_seconds(clock)) + "s");
}
2 changes: 1 addition & 1 deletion benchmark/range.ltn
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ function main() {
var range = std::whole(array);
std::sum(range);
}
std::println(std::to_seconds(clock) + "s");
std::println(std::string(std::to_seconds(clock)) + "s");
}
11 changes: 5 additions & 6 deletions benchmark/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@ run () {
echo
}


# run "array"
run "array"
run "string"
# run "memory"
# run "fx"
# run "member"
# run "range"
run "memory"
run "fx"
run "member"
run "range"
2 changes: 1 addition & 1 deletion benchmark/string.ltn
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ function main(){
for i (1, 1000000) {
var x = "A" + "BBBB" + "CCCCCCCC";
}
std::println(std::to_seconds(clock) + "s");
std::println(std::string(std::to_seconds(clock)) + "s");
std::println("CCCCCCCCBBBBA");
}
Binary file removed binFile
Binary file not shown.

0 comments on commit ec3ff2f

Please sign in to comment.