> From: "Amey Karkare" <[EMAIL PROTECTED]>
> Date: Mon, 6 Mar 2006 17:00:43 +0530
> 
> [...]
> 
> This is a possibility. However I thought it will be better -
> performance wise - if I could modify the C-routine directly. I am
> still a newbie to Scheme/mit-scheme and not very sure if modifying C
> will actually be faster than modifying user program.

The car primitive is often compiled in-line -- just a machine
instruction or three.  If performance of the metered program is the
issue, you might get by with an in-lined fixnum-increment primitive
(3-4 instructions?) alongside every in-lined car primitive.  Again, to
do that, modify your definition of "car" (not the user program).

> > Who-all's use of car and cdr do you want to measure?  Surely not the
> > whole system... ?

> No, only the user program's.

And any library routines (e.g. append) it calls?  If so, they will
need to be compiled for your modified "car" too.


_______________________________________________
MIT-Scheme-users mailing list
MIT-Scheme-users@gnu.org
http://lists.gnu.org/mailman/listinfo/mit-scheme-users

Reply via email to