Ben: I am sure your observations are certainly correct about
differences between OSes and what JITTing does, but we have noticed
that universally once a method gets big enough perf sucks.  Even if it
is a single platform which exhibits this behavior (since perhaps only
one OS generates enough code to make it too big), then making it
smaller will for sure solve have a positive affect on the platform in
question, but also never seems to negatively affect other platforms
very much.  I am guessing that Java is just much better at mitigating
perf problems with lots of small methods, but is stuck once methods
get too big.

Charlie: I have always wanted to hack Jay to replace the switch with a
class with method dispatch (static dispatch) to eliminate the switch
body altogether, but the source code to Jay is ancient C code
optimized for a PDP-11 :)

-Tom

On Sat, Jan 16, 2010 at 10:49 AM, Ben Evans
<benjamin.john.ev...@googlemail.com> wrote:
> On Sat, Jan 16, 2010 at 1:03 AM, Charles Oliver Nutter <head...@headius.com>
> wrote:
>>
>> I have found an interesting clue to poor startup!
>>
>> It appears that DefaultRubyParser.yyparse (the main parser method) is
>> *still* never being jitted by the JVM, in either client or server
>> modes (at least on OS X Java, which should be pretty normal).
>
> Charlie - Beware.
>
> Different OSes can have *very* different profiles for both the set of
> methods which are compiled and the amount of instructions each produce.
>
> My research in this area has unfortunately not produced any good rules of
> thumb yet, except "It's complicated", even between Unixish OSes.
>
> For example, Solaris and Linux may have different sets of methods which are
> compiled (and it is not simply the case that Linux compiles more than
> Solaris does - there are methods which Solaris will go for which Linux won't
> touch).
>
> To make matters worse, the amount of instructions generated for a method may
> vary wildly. I have seen Solaris and Linux generating 5x # instructions for
> a method (and in each direction).
>
> So, to do this kind of performance tuning cross-platform, I haven't found a
> good way except to repeat runs across all OSes I care about.
>
> Having said all that, if anyone else on-list has done work in this area, and
> has discovered any useful rules-of-thumb or other techniques for
> cross-platform optimisation, please share - would love to hear about any
> results here.
>
> Thanks,
>
> Ben
>



-- 
blog: http://blog.enebo.com       twitter: tom_enebo
mail: tom.en...@gmail.com

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to