Skip to content

Commit

Permalink
More fixes to old code
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulKlint committed Sep 29, 2024
1 parent a57a81e commit f4d842c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/org/rascalmpl/benchmark/CompareShortestPath.rsc
Original file line number Diff line number Diff line change
Expand Up @@ -118,16 +118,16 @@ public void measure1(rel[int,int] Graph1){
jtime = 0.0; jmin = 10000.0; jmax = 0.0;
rtime = 0.0; rmin = 10000.0; rmax = 0.0;
for(int i <- [1 .. 20]){
time1 = currentTimeMillis(); P1 = shortestPathPair(G, 1, 0); time2 = currentTimeMillis();
P2 = shortestPathPair1(G, 1, 0); time3 = currentTimeMillis();
time1 = getMilliTime(); P1 = shortestPathPair(G, 1, 0); time2 = getMilliTime();
P2 = shortestPathPair1(G, 1, 0); time3 = getMilliTime();

d1 = time2 - time1; jtime = jtime + d1; jmin = min(d1, jmin); jmax = max(d1, jmax);
d2 = time3 - time2; rtime = rtime + d2; rmin = min(d2, rmin); rmax = max(d2, rmax);
println("Java version: <P1> in <d1> millis");
println("Rascal version: <P1> in <d2> millis");
}
println("Java average: ", jtime/20, " [<jmin> .. <jmax>]");
println("Rascal average: ", rtime/20, " [<rmin> .. <rmax>]");
println("Java average: <jtime/20> [<jmin> .. <jmax>]");
println("Rascal average: <rtime/20> [<rmin> .. <rmax>]");
}
Expand Down

0 comments on commit f4d842c

Please sign in to comment.