Newsgroups: comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!rochester!udel!news.mathworks.com!newsfeed.internetmci.com!swrinde!howland.reston.ans.net!ix.netcom.com!netcom.com!milod
From: milod@netcom.com (John DiCamillo)
Subject: Re: Smalltalk slower than C++
Message-ID: <milodDpzqw8.H26@netcom.com>
Organization: NETCOM On-line Communication Services (408 261-4700 guest)
References: <4kuavb$1dbc@watnews1.watson.ibm.com> <4l1gmj$dg7@mag1.magmacom.com>
Date: Wed, 17 Apr 1996 05:21:44 GMT
Lines: 45
Sender: milod@netcom15.netcom.com

dbuck@mag1.magmacom.com (David Buck) writes:

>In article <4kuavb$1dbc@watnews1.watson.ibm.com>,  <PS59@> wrote:
>>It is considered "common knowledge" that smalltalk is slower than C++.
>>Are there any published articles on this subject?
>>How much slower is slower, twice as slow, 5 times, 10 times... ?
>>Appreciate any pointers on this subject.
>>
>>Yael.
>>

>That 'common knowledge' is a C++ bias.  In benchmarks I performed, I 
>found that Smalltalk was 5 times faster for memory 
>allocation/deallocation, about the same speed for message sends (allowing 
>Smalltalk method cache hits), faster for collections than The RogueWave 
>Tools.h++ libraryby a facter from 1 to 5 depending on the collection,

OK, I'm not going to suggest your benchmark is invalid, because
many people do use the Tools.h--, but (just FYI) that library
is not going to win any speed races.  Rogue were a bit hamstrung
by trying to be portable to a ton of different compilers (many of
which don't implement C++ very well).  

In other words, I've beaten the performance of Tools.h++ by a
factor of 4 myself in C++, so I'd say Smalltalk comes out about
even.

>and 
>slower for integer arithmetic (about 5 times).  Floating point arithmetic 
>in Smalltalk is poor - about 10 to 20 times slower.

>The number most commonly used is 1.5 to 2 times.  Your mileage may vary 
>depending on the needs of your application.

Yeah, that sounds about right.  But it probably also depends quite
a bit on which Smalltalk implementation you pick.

>David Buck
>dbuck@magmacom.com

-- 
    ciao,
    milo
================================================================
    John DiCamillo                         Fiery the Angels Fell 
    milod@netcom.com       Deep thunder rode around their shores
