POV-Ray : Newsgroups : povray.advanced-users : Object Oriented POV code : Re: Object Oriented POV code Server Time
29 Jul 2024 16:19:47 EDT (-0400)
  Re: Object Oriented POV code  
From: Tek
Date: 22 Feb 2004 16:18:38
Message: <40391cae$1@news.povray.org>
>   You need to know about how a library function is implemented anyways,
> regardless of how it is called, if you want to make as optimal code as
> possible.

Which is easier to keep track of if it has a different name to all the other
library add functions. You can glance at the code and see what it's calling.

>   If you are using class instances you know that calling the operator+
> for them will (potentially) generate a function call. If you don't know
> that, you don't have business making highly-optimized hacker code.

But if you're looking at unfamiliar code how do you know if you're looking at
class instances? They could just be typedeffed ints. You need to find the
definition of the class, which takes longer than simply seeing what function
it's calling.

However, I note you have dodged my question, which I think is the crux of the
issue:

Right, lets say your product ships in two weeks time, and you've discovered that
the physics guy who got sacked last week was a moron. Hey, it happens. You need
to go through his code and find everywhere that he's performing a matrix*vector
multiply, in order to replace it with a more efficient piece of code.

How do you do that?

-- 
Tek
www.evilsuperbrain.com


Post a reply to this message

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