|
The most common criticism against using Smalltalk in general, is that it
doesn't perform. Especially against C/C++. In this article I will look at areas
where performance is lost and what can be done about it. When these areas
are examined, you will see that any criticism is complete unfounded.
Firstly remember that Smalltalk uses garbage collection. What exactly does
that mean? This means that every object that you create has to be checked to see
if it is used and removed if it is no longer used. In Smalltalk MT, the garbage
collector only runs when the number of allocations exceeds a watermark.
C/C++, on the other hand, requires you the developer to explicitly remove
everything that you create. You are responsible for knowing when things are no
longer being referenced which is a tedious and error-prone activity.
How much garbage?
There are several methods for determining how many allocations your code is
producing.
|