|
-
Apr 23rd, 2003, 12:18 AM
#1
Thread Starter
yay gay
class inheriting
i have a program that has ClassD that inherits from classC that inherits from classB that inherits from classA..when i use classA it will be slower than a non-inheriting exactly the same class just because it is inheriting from another class that is inheriting too and that way? or not?
\m/  \m/
-
Apr 23rd, 2003, 06:50 AM
#2
Fanatic Member
I don't think that speed would be an issue unless you are inheriting lots of methods, etc. that you wouldn't even use - but that goes against the principles of inheritance anyway.
In your example, ClassA is the root of your inheritance structure, so ClassA that is inherited from, and a ClassA that is not inherited from should have the same performance.
For your other classes that do inherit from other classes, again - I don't think that speed would be that much of an issue, and I would think that the benefit of code reuse would be of more value.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|