From: hakim@pl.jaring.my
Subject: COMPARATIVE STUDY: Pure OOPLs VS Hybrid OOPLs (long)
Date: 1997/08/17
Date: 1997-08-17T00:00:00+00:00 [thread overview]
Message-ID: <871865218.13620@dejanews.com> (raw)
Do you have something more to add or to publish about " comparative
study : PURE OOPLs VS HYBRID OOPLs" ? please write it to me
hakim@pl.jaring.my or fahr820@tmsk.itm.edu.my
Fahrul Hakim
Msc. Computer Science M.I.T SHAH ALAM SELANGOR, M'SIA.
this is my article : please read it.
PURE OOPLs Vs HYBRID OOPLs : Uniformity versus efficiency (comparative
analysis)
---------------------------------------------------------
in pure OOPLs , all oo techniques (in particular inheritance,
polymorphism, and dynamic binding) can be applied to all sorts o
data, regardless of whether they are elementary or not. The relust is a
uniform and consistent thougt model that serves as the basis for the
construction of all algorithms. This is very convenient for the
programmer, as no mental switching between two kinds of operations is
necessary.
However, there is price to pay for such uniformity. Dynamic
binding
is involved whenver an operation with a simple integer number is
performed, thus leading to a considerable slowdown. This is the
reason
why hybrid languages are generally regarded as efficient, while pure
OOPLs are deemed slow.
The main reason why hybrid languages are more efficeint lies in the
fact that they do not support polymorphism with non-objects. This
has
two important consequences:
1) The compiler can statically determine the storage requirements for
conventional data. Whereas an object variable can refer to objets of
different sizes, a non-object variable will always contain data of a
fixed size. This means that a certain storage area can be reserved
for
every conventional variable at complile time. It is thus not
necessary
to access components of such variables via pointers, whereas in pure
oopls such indirect access cannot be avoided.
2)Elementary data types can be optimized. When a variable x is of
the type integer , static typing reles ensure that x will always
contain an integer number at run time. The compiler can use the
"knowledge" to treat the variable more efficeintly. For example,
special processor instructions can be used to optimize frequent
operations such as the statement x:=x+1.
There is no simple solution to this problem. Compared to
conventional data, additionla coses cannot be avoided whehn objects
are
manipulated. In hybrid languages, these costs can be avoided simply
by
avoding objects altogether, but that would be like emptying the
baby
out with the bath.
Several attempts have been implemented to avoid the run-time costs of
operations with elementary objects. For e.g. sophisticated
compilation
techniques (in particular, customized compilation, message inlining,
message splitting, and type prediction) are used by the Self
compiler
to achieve high performace. In omega, elementary types are defined
as
monomorphic.
> message splitting, and type prediction) are used by the Self
compiler
> to
> achieve high performace. In omega, elementary types are defined as
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
reply other threads:[~1997-08-17 0:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox