POV-Ray : Newsgroups : povray.general : Improving POV-Ray. : Re: Improving POV-Ray. Server Time
12 Aug 2024 19:35:32 EDT (-0400)
  Re: Improving POV-Ray.  
From: Daren Scot Wilson
Date: 19 Feb 1999 12:04:46
Message: <36CD5357.8A899B7C@pipeline.com>
> I have personally seen the difference between a program written in pure
> C, another version in C+ASM, and a pure ASM version. Needless to say,
> the ASM version kicked the C version,

Yeah, but C (or C++) isn't the best language to be optimizing for. There's a
story about Ada running circles around assembly - a newly hired Ada programmer
with only a dab of experience wrote code that outperformed what a team of
experienced assembly programmers came up with.  I can't find the URL for that
story, but it's been passed around a lot in Ada circles.  Like chess playing
programs, it's not smarts, but applying simple rules that humans understand
just fine, but unrelenting, more combinations and moves ahead. Turns out
there's almost always nothing to be gained by using clever opcodes, except on
older CPUs like the 486.  Pipelining in the Pentium is a more important
concern.


More stuff at 
http://www.acm.org/sigada/news/news.html 
and
http://www.adahome.com/

And as long as I'm on my favorite soapbox, anyone thinking of switching from C
or C++  to something capable of global optimizations, should pay a visit to
http://www.m3.org/.  (Ha, my only published ray tracing from all of 1998)


For anyone wanting to stick with C or C++, you gotta look into the PGCC
compiler with Pentium optimizations (good for all platforms using pentium and
any flavor of unix, heck, maybe there's a win32 port?)   

But for totally cross-platform optimizing, use a platform  independent language
like Ada-95 or Modula-3, and let the compiler do all hard work.

-- 
Daren Scot Wilson
dar### [at] pipelinecom 
www.newcolor.com
----
"Ada 95 is about the best language out there
 and people are beginning to notice. C++ seems to be evolving 
 into a monster and people cannot fail to notice that."
              -- Michael Rohan


Post a reply to this message

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