C is fastest (was: McMaster University Creates Open Source eHealth Records System)
Jon VanAlten
vanaltj-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Wed Oct 14 14:53:17 UTC 2009
On Wed, Oct 14, 2009 at 9:55 AM, Lennart Sorensen
<lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org> wrote:
>
> Some of us don't like seeing perfectly good hardware being wasted by
> lazy ass idiot programmers.
>
> Also some of us work on embedded hardware and really hate wasting CPU
> on stupid languages.
>
Not being the best tool for a particular task doesn't make a tool
useless or stupid.
> Saving developer time is highly overrated. How about the time of the
> tester you waste, the resources of customers you waste, etc.
>
The lazy ass idiot programmers you speak of earlier are capable of
such wastage regardless of the language used.
>> I'll also contend that, except for very short programs, a system written
>> in Smalltalk or Java, running with Animorphic VM ideas, could run faster
>> than a well written C version. There are two reasons. One, once a
>> program gets big enough, you need to do memory mgmt, and the VM's
>> garbage collection would probably do a better job than ad hoc code. Two,
>> the VM optimizations are discovered and applied at runtime, and it will
>> find optimizations that developers could not have imagined, when looking
>> at a small bit of code -- i.e. like what happens when the global
>> optimization switch is used for a C compiler.
>
> Java's garbage collection has always been amazingly bad. Java might
> actually become almost useful if it let the developer do the memory
> management.
>
Again, "not useful for my particular needs" does not imply "not useful
at all". Even accepting your premise that Java's garbage collection
is inefficient, there are use cases where one is less concerned with
CPU cycles. The average desktop or laptop on the market today is
grossly overpowered relative to the typical use of "Joe Consumer".
I think that where Java's strength lies is in the wide range of
preexisting functionality already built into the language. Of course,
to make good use of these a programmer must not be lazy or stupid,
good Java programmers have invested a lot of time in learning the
multitude of classes made available. And the fact that there
continues to be improvements made in the efficiency, ie Hotspot, of
the language at runtime just sweetens the deal.
cheers,
jon
ps: I say these things, but also my personal preference is for C. I
do like the low level of abstraction, and literal control over memory,
and the potential for efficiency esp. with a good optimizing compiler.
But I can also see that there are uses for higher level languages
such as Java, with its myriad of libraries.
--
The Toronto Linux Users Group. Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
More information about the Legacy
mailing list