Forum Post: RE: OO performance - inheritance

  • Thread starter Thomas Mercer-Hursh
  • Start date
Status
Not open for further replies.
T

Thomas Mercer-Hursh

Guest
Looks pretty linear ... e.g., 2.5 ms for 1 and with 6 levels of inheritance you are instantiating 7 objects so 2.5 x 7 = 17.5 which is only slightly less than what you observed. If you figure 2.5 to instantiate and .5 to link, you get 7 x 2.5 + 6 x .5 = 20.5 which is very close to what you measured. Recognize that a fully compiled language will resolve the inheritance into a single executable but an interpreted one can't. And, of course, there are abundant comparisons of this type with Java which don't really mean anything in real applications. How often do you instantiate 10,000 objects with 6 levels of inheritance? And no contents! :)

Continue reading...
 
Status
Not open for further replies.
Top