Xref: utzoo comp.object:2043 comp.lang.objective-c:76 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!decwrl!pacbell.com!pacbell!osc!tma From: tma@osc.COM (Tim Atkins) Newsgroups: comp.object,comp.lang.objective-c Subject: Re: Do we really need types in OOPL's? Message-ID: <3957@osc.COM> Date: 1 Nov 90 20:33:50 GMT References: <1426@media01.UUCP> <1990Oct9.190813.23402@ux1.cso.uiuc.edu> <2444@runxtsa.runx.oz.au> <1990Oct19.180646.8649@ux1.cso.uiuc.edu> Reply-To: tma@osc.UUCP (Tim Atkins) Followup-To: comp.object Organization: Versant Object Technology, Menlo Park, CA Lines: 16 As far as method lookup speed advantages possible with strong typing some work I did in Objective C a couple of years ago may be of some interest. I attempted several improvments of the standard algorithm and finally achieved a general lookup in the absence of strong typing on the order of 15 assembler instructions on a Sun 3. Adding type hints (not strong typing but just a hint of the expected type of referenced objects) and using code of the form: implementation = (runtime_type == expected_type) ? precomputed_imp : full_lookup(...); cut the average lookup costs in half for the applications I instrumented. Therefore, it seems to me that not strong typing, but weak type hints are worthwhile for gaining improvements in this area. - Tim Atkins