At first:
    If I'ld write a C++ compiler with Perl, this doesn't mean
        that it will generate code slower than Perl scripts:)
Then:
    Exhaustive optimization techniques (like loop expansion,
        disabling array bounds checking, etc.) really make your
        code faster in ANY case, BUT small amount of generated
        code may fit your processors cache, some jump may be
        converted to short jumps, etc.. So, generally speaking,
        more optimized code shall run faster, but it's bigger.
        Huge amount of code may even seriously decrease
        amount of free RAM, so more swapping will occur.
        AND ... if you do really meaninglessthings in your code, then
        there's a chance that optimizer will not eliminate
        this code, because it cannot generate OPTIMAL code.
        This is, mathematically speaking, twice a NP-hard problem.
        First when generating code, second when testing it's speed.
    I recommed using -server hotspot. Look at name...
        S E R V E R. I'm not sure guys from Sun randomly named it
        this way :)


----- Original Message ----- 
From: "Eric VERGNAUD" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Thursday, June 17, 2004 12:12 AM
Subject: Re: java server mode vs. client mode


le 16/06/04 21:50, Matt Bathje � [EMAIL PROTECTED] a �crit :

> I posted this on the struts list this morning, but it might get better
> answers here.
>
> I was reading the stories here:
>
> http://www.sys-con.com/story/?storyid=45250
> http://www.kano.net/javabench/
>
> Summary:
> Java in server mode is faster than C++ in the benchmarks run. Java in
client
> mode is much more iffy, sometimes faster, sometimes slower, and sometimes
> the same.
>
>
> So my question becomes - does anybody have any experience running their
> Tomcat jvm using the -server option instead of letting it default to
client?
>
> Based on what the tester says, the only downside of running the jvm in
> server mode is a longer startup time, but the Java code still beat C++
even
> with the longer times, so it can't be too bad.
>
> So anybody have any experience/thoughts on this?
>
>
> Thanks,
> Matt Bathje
>

Matt,

No one can really believe Java is faster than C or C++, because Java is
itself written in C and C++.

I haven't been through the benchmark code throroughly, but there's
definitely a bias somewhere.

-------------------------------
Eric VERGNAUD - JLynx Software
Cutting-edge technologies and
services for software companies
web: http://www.jlynx.com
-------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to