gcl-devel
[Top][All Lists]
Advanced

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

[Gcl-devel] Re: results with filenames


From: Camm Maguire
Subject: [Gcl-devel] Re: results with filenames
Date: 19 Apr 2006 20:27:42 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Greetings, and thanks!  Coupled with your remark regarding a 10%
speedup with allegro using multiple-values, I have a theory:  The
dominant factor here is the extra copying of variables, and the
location (stack vs heap, vs static area) is of no consequence -- I
surmise that Allegro is avoiding even one copy by making the call like
this:

(*LI1)(x,y,&r1,&r2,&r3);

A one (or two) copy solution is the Shelter mv solution:

 (*LI1)(x,y) /* which sets global MVloc[0] and MVloc[1]*/
 /*use MVloc[*] directly, one copy, or r1=MVloc[0], etc., two copy*/.

A strictly two copy solution is the traditional KCL:

vs_base[0]=x;
vs_base[1]=y;
vs_top=vs_base+2;        
(*L1)();
if (vs_top>vs_base) r1=*vs_base++;
if (vs_top>vs_base) r2=*vs_base++;

I suggest we implement the first pattern above for a hopefully
measurable speedup.

One might then ask about single value returns -- in general,

r1=L1(x,y);

might be zero copy if the value is left in a register -- my guess is
that this is impossible when the call proceeds through a pointer as in
our case.  If anyone can confirm or refute that would be great.  If
the argument is always written to the stack, it would be better in
general to do

(*LI1(x,y,&r1);

I'll followup with another post when I have something like this
working.

P.S>  must both

(proclaim '(ftype (function (t) (values t t)) foo))

and 

(proclaim '(ftype (function (t) t t) foo))

be supported?


Take care,

Matt Kaufmann <address@hidden> writes:

> With GCL 2.6.6 CLtL1, Schelter's mv:
> 
> 131072 maximum pages
> 
> 11791.744u 201.456s 3:22:34.21 98.6%  0+0k 0+0io 0pf+0w
> 
> With GCL 2.7.0 ANSI, mv as values:
> 
> 524288 maximum pages
> 
> 12755.821u 242.611s 3:41:41.94 97.7%  0+0k 0+0io 15pf+0w
> 
> With GCL 2.7.0 ANSI, Schelter's mv:
> 
> 524288 maximum pages
> 
> 11728.584u 241.667s 3:24:26.82 97.5%  0+0k 0+0io 2pf+0w
> 
> -- Matt
> 
> 
> 

-- 
Camm Maguire                                            address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah




reply via email to

[Prev in Thread] Current Thread [Next in Thread]