Re: [Hampshire] [Tech] The 'speed of a language'

Top Page

Reply to this message
Author: Samuel Penn
Date:  
To: Hampshire LUG Discussion List
Subject: Re: [Hampshire] [Tech] The 'speed of a language'
On Wednesday 29 October 2008 20:53:06 Vic wrote:
> > So once a program is compiled - is any language faster than any other
> > nowadays? Two programs: one in C, one in Java doing the identical job -
> > is there anything anywhere that says one will always be faster for
> > non-trivial applications?


> Although compilers of similar quality will tend to create fragments that
> run at the same speed, the same is not necessarily true for applications -
> as soon as you bring in things like automated garbage collection, you run
> the risk of descheduling your app for GC. This generally ruins your
> performance...


GC in real time applications can be a bad idea, though I believe
there are real-time versions of garbage collectors out there.

> As a general rule, the closer you are to the metal, the greater the
> *potential* for speed, but the higher the level of skill required to
> achieve that potential.


Things like the Hot Spot compiler in Java, which can re-optimise
byte code as the program is running depending on how its actually
being used can complicate things (ending up with Java performing
better than C in *some* circumstances).

Maturity of the compiler and libraries can make a big difference,
probably much more than the actual language for most mainstream
languages.

-- 
Be seeing you,                         http://www.glendale.org.uk
Sam.                        Mail/IM (Jabber): sam@???