Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!seismo!mcvax!enea!liuida!gorry From: gorry@liuida.UUCP Newsgroups: comp.lang.smalltalk Subject: Re: Messages? Message-ID: <577@tragicomix.liu.se> Date: Sun, 7-Jun-87 09:30:53 EDT Article-I.D.: tragicom.577 Posted: Sun Jun 7 09:30:53 1987 Date-Received: Sun, 7-Jun-87 23:39:44 EDT References: <572@tragicomix.liu.se> <574@tragicomix.liu.se> <283@suadb.UUCP> Organization: CIS Dept, Univ of Linkoping, Sweden Lines: 20 In reply to my request >Although the concept of inheritance is very powerful, it is clearly >associated with overhead from running around hierarchies to find >methods... anders@suadb.UUCP (Anders Bj|rnerstedt) wrote: >>Inheritance as such is not the cause of overhead. Dynamic binding >>of methods is. Naturally, if there is some way of providing static binding through a compiler, the problem I mentioned with inheritance certainly would not arise, as the method lookup would be replaced by a subroutine call. So, in the case of dynamic binding, inheritance sure adds to the overhead of finding a method. A typical implementation looks up the method from the hashtable belonging to the class of the object, follows the inheritance chain if not found, and repeats. To shorten these paths, some redundancy scheme might be applicable. gorry gorry@majestix.liu.se