This commit is contained in:
lunarcleint
2024-08-22 14:44:24 -07:00
parent 8da9ed942d
commit fd5a2d9143
2 changed files with 6 additions and 4 deletions
+2
View File
@@ -18,6 +18,8 @@
--define linux
# Copying the assets from source code to bin folder
# --cmd rm -rf bin/cpp/assets
# --cmd cp -r assets bin/cpp/assets
--cpp bin/cpp
--cmd cd bin/cpp
--cmd ./Main
+4 -4
View File
@@ -10,13 +10,13 @@ class Main {
static function main() {
#if BENCHMARK
Sys.println("Running benchmark");
//new Benchmark("Test", 1000);
var haxeTotalTime:Float = 0;
var hscriptTotalTime:Float = 0;
var haxeTimes:Array<Float> = [];
var hscriptTimes:Array<Float> = [];
var hscriptTimes:Array<Float> = [];
var iterations:Int = 10;
for (i in 0...iterations) {
@@ -28,10 +28,10 @@ class Main {
haxeTotalTime += benchmark.haxeTotalTime;
hscriptTotalTime += benchmark.hscriptTotalTime;
}
haxeTimes.sort((a, b) -> return a > b ? 1 : -1);
hscriptTimes.sort((a, b) -> return a > b ? 1 : -1);
var slowestHaxeTime:Float = haxeTimes[haxeTimes.length-1];
var slowestHscriptTime:Float = hscriptTimes[hscriptTimes.length-1];
var fastestHaxeTime:Float = haxeTimes[0];