Newsgroups: comp.lang.lisp
Path: cantaloupe.srv.cs.cmu.edu!rochester!cornellcs!newsstand.cit.cornell.edu!news.acsu.buffalo.edu!dsinc!spool.mu.edu!howland.erols.net!news.mathworks.com!fu-berlin.de!news.dfn.de!news.dkrz.de!news.rrz.uni-hamburg.de!news.Hanse.DE!wavehh.hanse.de!cracauer
From: cracauer@wavehh.hanse.de (Martin Cracauer)
Subject: Re: ANSI CLISP: strengths vs. weaknesses?
Message-ID: <1996Oct22.190840.26842@wavehh.hanse.de>
Organization: BSD User Group Hamburg
References: <slrn55n3fg.5p.psci@teleport.com> 	<1996Oct10.100654.824@wavehh.hanse.de> <325E98A0.44CD@franz.com> 	<1996Oct18.115909.28857@wavehh.hanse.de> <TMB.96Oct19010039@best.best.com> <1996Oct20.112936.25643@wavehh.hanse.de> <vrotneyDznMB1.CC@netcom.com>
Date: Tue, 22 Oct 96 19:08:40 GMT
Lines: 41

vrotney@netcom.com (William Paul Vrotney) writes:

>In article <1996Oct20.112936.25643@wavehh.hanse.de> cracauer@wavehh.hanse.de (Martin Cracauer) writes:

>> 
>> tmb@intentionally.blank-see.headers writes:
>> 
>> >No runtime dispatch mechanism, not even the C++ mechanism, is fast
>> >enough to use for "everything".  The only way to be able to give the
>> >illusion of treating things like numbers just like other objects is
>> >via type inference, immediate representations, and other optimizations.
>> 
>> >In fact, in practice, the "efficient" C++ dispatch mechanism is not
>> >significantly faster than the much more dynamic mechanism found in
>> >Objective-C (or, I believe, IBM's SOM).  But the few extra cycles that
>> >C++ squeezes out cause lots of headaches when it comes to system
>> >integration, dynamic configuration, etc.  In particular, OLE and SOM
>> >are really just workarounds for the inflexible and cumbersome object
>> >model that C++ has built into it (btw, if you want to know all the
>> >unpleasant details, take a look at Lippman's "Inside the C++ Object
>> >Model").
>> 
>> This begins to be off-topic, but the lookup mechanism of ObjC requires
>> one pointer indirection more than the C++ virtual function
>> call. Pointer indirections can be very expensive given today's memory
>> bandwidth/CPU speed relation. 
>> 

>Actually, I was always in complete agreement with the original poster's
>remarks comparing C++ to Objective-C.  I was also under the impression that
>pointer indirection was not very expensive on many modern day computers.  So
>could you please explain what you mean by this last sentence.

I mean in ObjC you have to follow two pointers to memory location and
both could or could not be loaded in the CPU cache. This is for the
GNU runtime.

Martin
-- 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Martin Cracauer <cracauer@wavehh.hanse.de>  http://cracauer.cons.org
