POV-Ray : Newsgroups : povray.advanced-users : Object Oriented POV code : Re: Object Oriented POV code Server Time
29 Jul 2024 12:27:17 EDT (-0400)
  Re: Object Oriented POV code  
From: Christopher James Huff
Date: 22 Feb 2004 18:42:34
Message: <cjameshuff-D818AA.18431622022004@news.povray.org>
In article <40392dba$1@news.povray.org>, "Tek" <tek### [at] evilsuperbraincom> 
wrote:

> Well yes, I'm not debating that. I'm saying for what you're doing 
> it's better to deal with things on a cleaner more mathematical basis, 
> but for what I do at work it's better to deal with things on a more 
> technical implementation-based level.

No...I don't give a damn about the mathematics. It's just cleaner 
looking and easier to read with overloaded operators. Easier and faster 
to write and debug, giving me much more time to spend on optimization or 
extension of the program.


> > Yes you did...in a reply to one of my earlier messages:
> No, I said it was an argument against the *use* of operator overloading, not
> it's existence. I'm not saying it should never be used, I'm just explaining 
> why we don't use it.

Then why did you even reply to my message?


> Which still is not a reason to hide what the code is actually doing.

The only information hidden is that which isn't of any use to the 
situation anyway. You don't need to know exactly how vectors and 
matrices are multiplied, it is enough to know that doing so is 
time-consuming.


> Besides, a good optimiser does neither of those, you begin by 
> profiling the system extensively to ascertain what is slow. It 
> doesn't matter how cumbersome the big concepts are, or how badly 
> implemented the low level things are, all that matters is how long 
> things take.

I did mention "specific bottlenecks". How do you think those bottlenecks 
would be found, if not by profiling the program?


> > And I don't buy your argument about vector-matrix
> > multiplication...if you're doing high-performance code, you should
> > always be aware of the types you're working with.
> 
> But how do I gain this awareness if it's not my code?

You read the code.


> Last project I 
> was on had 20 programmers, and I was one of the main people assigned 
> to optimise things. It was more important to me to see how the code 
> worked at a lower level than to see nice clean algorithms.

You regularly have separate programmers coding and optimizing? That does 
not sound like a good idea...the person optimizing starts out knowing 
nothing about the code.
And again, it's not about "nice clean algorithms", it's "nice clean 
*code*" that lets you see what's being done!


> However I know there are other games companies that go all out for OO code,
> because they wish to code at a higher level. They do not produce such 
> efficient code as we do :)

Then they're doing it wrong. And what company do you work for? I never 
want to work there.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tagpovrayorg>
http://tag.povray.org/


Post a reply to this message

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