grt-talk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [grt-talk] Accuracy bug


From: Simon Adameit
Subject: Re: [grt-talk] Accuracy bug
Date: Sat, 26 Apr 2003 09:50:34 +0200
User-agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.3) Gecko/20030407

Nikodemus Siivola wrote:
On Fri, 25 Apr 2003, Simon Adameit wrote:


One possibility would be to use classes and replace our current
intersects, normal, etc. functions with methods.

Classes yes. Methods no. But I'm not really sure of either...

Why? I've understood that the slot-access speed of classes vs. structs is
pretty much the same. And that's what we want: fast slot access.

And once we refactor the object struct into object, shape and texture
-structs it will mean two slot-accesses to get the shape / texture
functions. With classes we could move some of the logic into inheritance
and the compiler *might* be able to cheat and get the functions with a
single slot access. (I don't know if this makes sense to anyone but me...)

But methods. Ungh. All my tests so far indicate that method dispatch is
signifanctly slower then just getting function from a slot and calling it.
But I'm quite willing to believe this ain't so if someone can demonstrate
it to me. Maybe I'm just doing something wrong.


Ok, I just wasn't sure what reasons you had for not using methods, I didn't know that it is too slow.
Will you test classes vs. structs?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]