Am 11.03.2013 10:21, schrieb OlliP:
>
>> hmm... the indy version is for me within the expected margin. The
>> question is more why the version without indy is so much faster. Let's
>> see what direct method calls I can find... CFG#getNumNodes,
>> BasicBlock#getName, BasicBlock#inEdges, BasicBlock#outEdges,
>> SimpleLoop#setIsRoot
>
> SimpleLoop#setIsRoot is only used to print out the statistics at the end of
> the run. Just for information.
as long as at least one of the other methods is called in each iteration
it can give a hint
>> I could not start it, since there is a StackOverflow in
>> HavlakLoopFinder#doDFS, after "Performing Loop Recognition, 1 Iteration"
>
> Oops. Did you run LoopTesterApp.groovy with JAVA_OPTS=-server -Xss15500k
> -Xmx1G? That should do it.
-server is not doing anything different for my since I am on 64bit, but
the others are required it seems.. that makes it run (java build
1.8.0-ea-b73):
primopts version (-Xss15500k -Xmx1G):
> Time: 115668 ms
>
> Total Memory: 943040 KB
> # of loops: 121002 (including 1 artificial root node)
> # of BBs : 252013
> # max time: 3407
> # min time: 0
indy version (-XX:-TieredCompilation -Xss15500k -Xmx1G):
> Time: 130511 ms
>
> Total Memory: 942080 KB
> # of loops: 121002 (including 1 artificial root node)
> # of BBs : 252013
> # max time: 4575
> # min time: 0
using jdk1.7.11 (and same settings as above):
primopts:
> Time: 111940 ms
>
> Total Memory: 936128 KB
> # of loops: 121002 (including 1 artificial root node)
> # of BBs : 252013
> # max time: 3082
> # min time: 0
indy:
> Time: 196210 ms
>
> Total Memory: 937152 KB
> # of loops: 121002 (including 1 artificial root node)
> # of BBs : 252013
> # max time: 5043
> # min time: 0
that's only to show the significant influence of the JDK.
Furthermore, I see that the time is the total time. The question is what
do you want to test with this using the total time? indy arguably takes
longer to optimize, so even if the final result in indy is faster than
primopts (can happen!) it may still not show in that time.
If I use gbench on the 50 iterations loop and let it do the iterations,
I get with jdk 1.8:
indy: 1.38s per iteration cpu time
primopts: 1.92s per iteration cpu time
according to that indy is faster than the primopts version. That means
if you did let the test above run not fo 50 iterations, but let's say
for 500 (house number), indy should be faster.