From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fac41,b87849933931bc93 X-Google-Attributes: gidfac41,public X-Google-Thread: f43e6,b87849933931bc93 X-Google-Attributes: gidf43e6,public X-Google-Thread: 109fba,b87849933931bc93 X-Google-Attributes: gid109fba,public X-Google-Thread: 103376,b87849933931bc93 X-Google-Attributes: gid103376,public X-Google-Thread: 1108a1,b87849933931bc93 X-Google-Attributes: gid1108a1,public X-Google-Thread: 114809,b87849933931bc93 X-Google-Attributes: gid114809,public From: pcg@aber.ac.uk (Piercarlo Grandi) Subject: Re: What is wrong with OO ? Date: 1997/01/12 Message-ID: #1/1 X-Deja-AN: 209673065 sender: pcg@osfb.aber.ac.uk references: <5a0niaINNlda@topdog.cs.umbc.edu> <32C43AC8.24E2@sn.no> <32C557F6.532C@rase.com> <5aa0eo$thd@krusty.irvine.com> <5aadbr$ad8@masters0.InterNex.Net> <32D64433.41C6@wi.leidenuniv.nl> organization: Prifysgol Cymru, Aberystwyth newsgroups: comp.lang.c++,comp.lang.smalltalk,comp.lang.eiffel,comp.lang.ada,comp.object,comp.software-eng Date: 1997-01-12T00:00:00+00:00 List-Id: >>> "bsamwel" == Bart Samwel writes: >> Assembler will ALWAYS be the most efficient language. The more you >> abstract the problem, the more you "generalize" the solution to a >> given problem, the more you necessarily give up in efficiency. C >> takes a minimal 3x hit on integer arithmetic, 10x on more complex >> stuff; and OO, because of the overhead interpreting where >> to send things, is 10x on top of that. bsamwel> IMO this number is only a valid approximation for Smalltalk and bsamwel> other dynamically typed OO languages. Statically typed bsamwel> languages like C++ (hybrid, but supporting OO) and Eiffel (pure bsamwel> OO) achieve a much lower impact on performance than 10x. I bsamwel> won't give any numbers because I don't have them, but I know bsamwel> most number-crunching usually runs at very acceptable speed in bsamwel> these languages; a bit, but not much slower than C. By using clever implementation tricks (such as dynamic inlining!) many dynamically typed languages can be just as fast as. Self is claimed to run at just half the speed of C, and two to three times the speed of most compiled ``Smalltalk'' implementations (to the point that the Smalltalk-80 implementation written in Self by Mario Wolzcko usually runs twice as fast as native commercial ``Smalltalk'' implementations). Then some Lisp implementations are amazingly fast as well; CMU CL with the Python compiler can be quite impressive. The NeXT and GNU Objective-C iplementations have been carefully tuned, and result in programs usually about as fast as those written in C; for dynamic resolution is quite fast and is not the dominant overhead. ``Eiffel'' compilers also offer default dynamic resolution which is well optimized. In many cases high performance is also achieved by analyzing the program and inferring where dynamic overload resolution is actually not needed...