Stack ILP issues (Was: Slow recursive functions

Mladen Adamovic adamm@etfbl.net
Wed Aug 17 11:35:00 GMT 2005


On 2005年8月17日 10:05:14 +0100, Andrew Haley wrote
> It's not just that, it's that stack access explicitly touches memory,
> so even push a; pop d has a side effect. The interesting question 
> for me is whether moving to a different ABI that passes args in registers
> really would help. I'm just guessing here.

Stack anyway will probably have the line in the processor cache so it should
have fast read/write. I think it is not worth spending time.
> > But real performance issue is that STACK instructions have AFA I 
> remember 8% > in SPEC2000 tests.
> I don't quite understand your point here.

SPEC2000 test are standard speed test in microprocessor design. 
It shows that real application might have 8% of stack instructions. (i'm not
certain what the correct number is, at the moment I don't have that book to
check, something about 8%).
> > Anyway, can somebody of developers say which techniques did they 
> use to > exploit ILP in GCJ?
>> Nor here. What exactly are you asking? Instruction Level 
> Parallelism is exploited in gcc several ways, but mostly by the 
> scheduling pass.

I asked to name the techniques and algorithms used to exploit ILP in gcj.
If they are the same as in gcc then I should ask it in gcc mailing list.
I wanted that information to try to see what can be done to exploit more ILP
in gcj and make gcj more faster.
> > Speed of gcj might be important because JVM have awfull 
> performance > in matrix multiplication and nested loops. Probably 
> they don't do > compiler techniques to exploit ILP for loops.
>> Probably not, no. gcc is getting better at this, but in gcj we still
> don't hoist bounds checks out of loops so we still have difficulty
> doing aggressive scheduling. Once we get bounds checks hoisted,
> things will be much better.

I mean that Sun JVM have awfull performance in matrix multiplication and
nested loops. 
In fact as I see gcj have good performance in nested loops.
About gcj if I understand you clearly Array Index out of bounds exception
implementation is the thing which slow down the nested loops. To improve it
the code which check exception should be moved somehow outside of the loop, if
possible. But, yes, sometimes it can be moved outside of the array if you can
find certain criteria when it will happend.
Mladen Adamovic
home page: http://home.blic.net/adamm


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /