POV-Ray : Newsgroups : povray.off-topic : A comparison : Re: A comparison Server Time
10 Oct 2024 23:20:20 EDT (-0400)
  Re: A comparison  
From: Darren New
Date: 19 Mar 2008 22:31:34
Message: <47e1da96$1@news.povray.org>
Invisible wrote:
> If all you're after is the ultimate machine efficiency, C can probably 
> still do that better than almost any other language, given enough skill.

... on a machine whose architecture is well-matched to C.  And given 
enough skill.

A COBOL interpreter in C isn't going to be nearly as fast as a COBOL 
interpreter in microcode. (Yes, btdt. :-)  It's going to be hard to beat 
one clock cycle per byte for an "edit byte string" (similar to "print 
using" in BASIC) using a C function.

A FORTH chip is going to run FORTH way faster than it'll run the same 
algorithm written in a way that looks like reasonable C, I expect.

Put 128 cores on a chip connected in a hypernet, and you're going to 
have a heck of a time writing an efficient sort algorithm in C for that.

Put a big pile of SIMD processors together, and you're not going to be 
able to program it in C at all. APL maybe, but not C.

C makes a whole pile of assumptions about processor architecture that 
most people don't notice because most processors they use have evolved 
to account for what C does. But the assumptions are there.

-- 
   Darren New / San Diego, CA, USA (PST)
     "That's pretty. Where's that?"
          "It's the Age of Channelwood."
     "We should go there on vacation some time."


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.