Article View: comp.lang.java
Article #156Re: Will Java kill C++?
From: Alan L. Lovejoy
Date: Tue, 09 Apr 1996 01:13
Date: Tue, 09 Apr 1996 01:13
33 lines
2141 bytes
2141 bytes
Mark VanTassel wrote: > > "Alan L. Lovejoy" <alovejoy@concentric.net> wrote: > > >Bzzzt! Not according to the benchmarks I've done. Go benchmark the factorial or fibonacci > >functions (implemented recursively) in both C and a good Smalltalk. You are in for a big > >surprise. > > You're not seriously suggesting that a fibonacci series be programmed > recursively, are you??? Have you looked at the number of operations > involved in calculating, say, the 1000th term as vs a standard looping > approach? > > I don't think this is a valid benchmark... (and I too fail to see how > Smalltalk can be faster than C++ except perhaps in bizarre special > cases) > > - /\/\ark \/anTassel (mvantassel@teambca.com) Sigh. The point is the relative speed of function call versus message send. Whether a recursive algorithm is better or worse than the equivalent iterative algorithm simply has nothing to do with it, because the issue was not "which language can compute factorials faster," but rather "is a function call faster than a message send." The most important case where Smalltalk can be faster than C is when the initial version of the Smalltalk program is done ten times faster than the initial C version, and the Smalltalk programmer(s) spend the remaining time optimizing the code (by using more sophisticated algorithms, perhaps). --Alan
Technical Details
Message-ID:
<3169B9AD.2701@concentric.net>Path:
arc1-ca.pugleaf.net!newsfeed.concentric.net!newsReferences:
<3134D499.653E@ix.netcom.com> <313613B2.136E@ksopk.sprint.com> <4i7qhl$ik6@cronkite.seas.gwu.edu> <4iuhi7$fmf@sundog.tiac.net> <4iumap$mn5@hustle.rahul.net> <31582A45.3742@vmark.com> <3163C031.4FB1@esec.ch> <3164888D.2B01@concentric.net> <4kbfn8$1bu@news1.is.net>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!newsfeed.concentric.net!news From: "Alan L. Lovejoy" <alovejoy@concentric.net> Newsgroups: comp.lang.java,comp.lang.c++,comp.lang.smalltalk Subject: Re: Will Java kill C++? Date: Mon, 08 Apr 1996 18:13:17 -0700 Organization: Modulation Message-ID: <3169B9AD.2701@concentric.net> References: <3134D499.653E@ix.netcom.com> <313613B2.136E@ksopk.sprint.com> <4i7qhl$ik6@cronkite.seas.gwu.edu> <4iuhi7$fmf@sundog.tiac.net> <4iumap$mn5@hustle.rahul.net> <31582A45.3742@vmark.com> <3163C031.4FB1@esec.ch> <3164888D.2B01@concentric.net> <4kbfn8$1bu@news1.is.net> NNTP-Posting-Host: cnc009050.concentric.net Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 2.0GoldB1 (Win95; I)