Newsgroups: comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!bb3.andrew.cmu.edu!nntp.sei.cmu.edu!cis.ohio-state.edu!rutgers!utcsri!utnut!torn!nott!cunews!tina.mrco.carleton.ca!knight
From: knight@mrco.carleton.ca (Alan Knight)
Subject: Re: Smalltalk performance
X-Nntp-Posting-Host: tina.mrco.carleton.ca
Message-ID: <knight.807808525@tina.mrco.carleton.ca>
Sender: news@cunews.carleton.ca (News Administrator)
Reply-To: knight@mrco.carleton.ca (Alan Knight)
Organization: The Object People
References: <DCqvup.n43@UQuebec.CA> <3vt3rf$2ap@budapest.ozonline.com.au>
Date: Mon, 7 Aug 1995 15:15:25 GMT
Lines: 48

In <3vt3rf$2ap@budapest.ozonline.com.au> jmullens@ozonline.com.au (James Mullens) writes:

>What vendors generally mean when they say 'approaching C/C++ speed' is that
>the *apparent* responsiveness of the application to the user is similar.  ie. the
>user can only detect a very small difference.

I don't think that's what they mean. I think they mean that for a
large range of applications (and not just "data stuffing") Smalltalk's
speed can be quite competitive.

For small benchmarks Smalltalk often does badly, but small benchmarks
are often like the one we saw posted here, doing arithmetic in a loop.
This does no memory allocation, no procedure calls, no data structure
manipulation and quite possibly fits entirely in cache. On a good
compiler the entire benchmark may even be optimized away to nothing.
While this does tell you something about performance, it doesn't tell
you much about a typical application in most languages (I note that
the other version of this benchmark was written in FORTRAN, which
actually does satisfy most of those criteria except for the cache
bit).

There is definitely overhead associated with some of Smalltalk's
facilities, but as systems become larger, they often require these
facilities anyway, at which point the overhead of having them present
in the system and optimized can be lower than that of implementing them
yourself. The typical example is memory management.

>However, that does *not* mean that Smalltalk is a competitor to C/C++ in the areas
>where those languages are strong:

>* high performance systems (servers, telecommunications)
>* shrink wrap software
>* real time
>* device handling

Although Smalltalk has been used in some of these areas (e.g. real
time, servers) with success.

>Try more realistic, higher level benchmarks that are closer to what you are
>trying to achieve.

Absolutely.

-- 
 Alan Knight                | The Object People
 knight@acm.org             | Smalltalk and OO Training and Consulting
 alan_knight@mindlink.bc.ca | 509-885 Meadowlands Dr.
 +1 613 225 8812            | Ottawa, Canada, K2C 3N2
