[Ecls-list] Minor optimizations are usually the most relevant
Juan Jose Garcia-Ripoll
juanjose.garciaripoll at googlemail.com
Sat Jun 5 09:25:54 UTC 2010
>From running the ANSI test suite
real time : 189.953 secs
run time : 99.580 secs
Yesterday the run time was around 109 secs. The change? ecl_eql() now
returns immediately when the types are immediates (i.e. EQL is EQ for them).
In other words, changing
bool
ecl_eql(cl_object x, cl_object y)
{
cl_type t;
if (x == y)
return TRUE;
t = type_of(x);
if (t != type_of(y))
return FALSE;
switch (t) {
to this
bool
ecl_eql(cl_object x, cl_object y)
{
if (x == y)
return TRUE;
if (IMMEDIATE(x) || IMMEDIATE(y))
return FALSE;
if (x->d.t != y->d.t)
return FALSE;
switch (x->d.t) {
This kind of things always amaze me.
BTW, before the quest for optimizations began, ECL used around 126 seconds
to run the test suite.
Juanjo
--
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://tream.dreamhosters.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20100605/805eeda2/attachment.html>
More information about the ecl-devel
mailing list