C is fastest
Lennart Sorensen
lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Wed Oct 14 20:03:46 UTC 2009
On Wed, Oct 14, 2009 at 03:57:12PM -0400, Christopher Browne wrote:
> On Wed, Oct 14, 2009 at 3:44 PM, Lennart Sorensen
> <lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org> wrote:
> > I do believe that if we actually want to take advantage of our now common
> > 4 and 8 way machines, we need languages that are functional not OO so
> > that the language and compiler can auto generate multithreaded code
> > to take advantage of modern machines. Most programmers can't write
> > multithreaded code that works. Preferably they shouldn't have to either,
> > but I do believe they have to give up OO to get there. Perhaps OO
> > doesn't have to completely go, but certainly I don't believe java and
> > C++ stand a chance here. Microsoft may be able to do something with C#
> > or more likely F# (which is a nice looking language, too bad I don't
> > care to write code in Visual Studio on windows).
>
> With this I agree.
>
> FYI, F# is a dialect of ML which is mostly like OCAML. (Presumably
> except for some parts that aren't like OCAML; dunno what...)
Yes it does look a lot like it.
> It should be pointed out that OO has a propensity for being
> incompatible with thread-safety, and that's an increasing problem
> these days. OO tends to bind state together with data structures, and
> requires having strict interfaces to those objects, which, with the
> greater concurrency we're seeing on many-core CPUs, leads to a lot
> more locking/blocking.
Data structures are a good thing. Tieing the state with the data is not
such a good thing once you want to make it scalable.
> The language that seems to have gone the furthest in the opposite
> direction is Erlang.
Not one I have used.
> They basically took Prolog, dropped out backtracking, which means
> you're left with deterministic functional (e.g. - "one path") code,
> which has the massive benefit that practically all your code becomes
> re-entrant, and may be invoked many times in parallel.
Prolog I have used, and it sure is weird. My wife has done much
more with it and some of the stuff she did I still can't understand.
Apparently prolog can do things I had never imagined, but the syntax to
do it is just weird. Like what direction is this executing in anyhow?
> Unfortunately, they took a Prolog-ish syntax, which tends to confuse people.
It certainly would.
> It's not clear whether ML can be readily parallelized in congruent fashion.
At least it appears to have potential for it.
--
Len Sorensen
--
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