[Ecls-list] Minor optimizations are usually the most relevant
Konovalov, Vadim (Vadim)** CTR **
vadim.konovalov at alcatel-lucent.com
Wed Jun 9 10:45:44 UTC 2010
________________________________
From: Juan Jose Garcia-Ripoll [mailto:juanjose.garciaripoll at googlemail.com]
Sent: Saturday, June 05, 2010 1:26 PM
>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) {
IMHO changing
t = type_of(x);
with consequent usage of "t" into "x->d.t" is not adding speed: previously expression "x->d.t" was calculated only once, and now it is calculated several times.
the difference could be too low to notice it, but it is a small step back, seems to me...
Regards,
Vadim.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20100609/f86b0503/attachment.html>
More information about the ecl-devel
mailing list