This repository has been archived by the owner on Feb 20, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Benchmark
Michael Rothenbücher edited this page Feb 9, 2018
·
9 revisions
Eine Schleife bei der bis 10.000 gezählt und der Zähler einer anderen Variablen zugewiesen wird.
Testcode GroovyFO pure Java:
def start = System.currentTimeMillis();
def j = 0
for(int i=0; i < 10000 ; i++){
j = i;
}
println "Dauer GroovyFO groovy: "+(System.currentTimeMillis()-start)+" ms"
Testcode GroovyFO Wertzuweisung an abas Variable:
art("I5", "xi", "xj")
def start = System.currentTimeMillis();
for(int i=0; i < 10000 ; i++){
u.xj = i
}
println "Dauer GroovyFO FO1: "+(System.currentTimeMillis()-start)+" ms"
Testcode GroovyFO abas Variable als Zähler der Schleife:
art("I5", "xi", "xj")
def start = System.currentTimeMillis();
for(u.xi = 0; u.xi < 10000 ; u.xi++){
j = u.xi
}
println "Dauer GroovyFO FO2: "+(System.currentTimeMillis()-start)+" ms"
Testcode GroovyFO abas Variable als Zähler der Schleife und zur Wertzuweisung.
art("I5", "xi", "xj")
def start = System.currentTimeMillis();
for(u.xi=0; u.xi < 10000 ; u.xi++){
u.xj = u.xi
}
println "Dauer GroovyFO nur FO: "+(System.currentTimeMillis()-start)+" ms"
Testcode FO.
.art int xi xj
.fo xj = 0
!SCHLEIFE
.fo xi = xj
.fo xj = xj+1
.weiter SCHLEIFE ? xi < 10000
.weiter
Herkunft | durchschnittliche Dauer(ms) |
---|---|
GroovyFO groovy | 0,2 |
abas FO | 577,3 |
Herkunft | durchschnittliche Dauer(ms) |
---|---|
GroovyFO FO1 | 1461,1 |
GroovyFO FO2 | 6774,4 |
GroovyFO FO | 8248,9 |
Herkunft | durchschnittliche Dauer(ms) |
---|---|
GroovyFO FO1 | 1463,0 |
GroovyFO FO2 | 5850,5 |
GroovyFO FO | 7253,3 |
Herkunft | durchschnittliche Dauer(ms) |
---|---|
GroovyFO FO1 | 1157,0 |
GroovyFO FO2 | 4647,0 |
GroovyFO FO | 5997,0 |
Herkunft | durchschnittliche Dauer(ms) |
---|---|
GroovyFO FO1 | 916,0 |
GroovyFO FO2 | 3440.6 |
GroovyFO FO | 4408.6 |