John Tobey <[EMAIL PROTECTED]> writes:
>> I don't think so - it is a question which way we code the source:
>> 
>> A. Use 'inline' every where and trust compiler not to do what we told it 
>>    if it knows better.
>> B. No inline hints in the source and trust the compiler to be able to 
>>    do the right thing when prodded with -O9 or whatever.
>> C. Make "informed" guesses at to which calls should be inlined.
>> 
>> My view is that (B) is the way to go, aiming for (C) eventually, because 
>> (A) gives worst-case cache purging.
>
>There doesn't have to be an 'eventually'.  We can have (C) now.

Then you know perl's execution profile a lot better than I do ;-)
Pop Quiz:

nick@bactrian:/home/p4work/perl/devperl > grep AvFILLp *.c | wc -l
    103                         

1. Of the those 103 calls to AvFILLp() which one is called most times running 
   make test?
2. What is ratio of most-called one to least called one?

I doubt if _anyone_ knows that ... (and as its a $£"%£$% macro we cannot 
use gprof to find out!).


>Having both forms available (i.e., the suggestion that started this
>thread) lets us 'help' the compiler, which, as Brent points out, is
>free to ignore our hint under normal optimization flags.
>
>Moving from a first-guess (C) to an optimal (C) (where we make
>reasonable hints all the time, no doubt with the aid of some Configure
>tests or machine-dependent conditionals) can be an ongoing pursuit.
-- 
Nick Ing-Simmons

Reply via email to