[Date Prev][Date Next][Thread Prev][Thread Next][Author Index][Date Index][Thread Index]

[uunet!parcplace!deutsch: Cost of polymorphism]

Peter did some analysis on the cost of message sends in Smalltalk
based on heavy use of polymorphism.  The current system doesn't reuse
code much, so even though they have deeper levels of inheritance than
we do, they use less argument polymorphism than we do (our style is
better on both counts...).  Therefore they optimized for a case that
may be much less common for us.
Return-Path: <uunet!parcplace!deutsch>
Date: Thu, 17 May 90 09:53:30 PDT
From: uunet!parcplace!deutsch (Peter Deutsch)
To: tribble@xxxxxxxxxxx
Subject: Cost of polymorphism

Measured on the SPARCstation, the cost of a polymorphic send is about 7-8
times the cost of a non-polymorphic send.  With the translator modification
I mentioned at lunch, the cost ratio drops to about 4-5.  I expect a
slightly greater savings on the 386.  Things are not currently arranged so
as to make this possible on the 68020.

I don't think I can improve these numbers significantly beyond where they
are now.