Newsgroups: comp.lang.scheme
From: "Jens Axel Søgaard" <use...@soegaard.net>
Date: Fri, 11 Oct 2002 18:35:07 +0200
Local: Fri, Oct 11 2002 12:35 pm
Subject: Re: Shortest self-evaluating evaluator
Jens Axel Søgaard wrote: Indeed it was a missing quote. > Joe Marshall wrote: >> For the sake of curiosity, how much slower is the extra >> interpretation layer? >> Can you go another level deeper? > I get almost the same execution time for 1, 2, 3 Here are the timings from DrScheme from level 1, 2 and 3. cpu time: 0 real time: 0 gc time: 0 Here is the revised code: ; Self evaluating evaluator, version 2 (define first car) ; Support code for fak-example (define fak '(lambda (f) (define fac-code (list (list fak fak) 5)) ; Conventions: n name, v value, r environment, e expression ; setup initial environment; (define (ccons a) (define initial-env eval) ; use Scheme-eval to get jas-eval ; test it in (fak 5) ; use jas-eval to evaluate (jas-eval (fak 5) initial-env) ; use jas-eval to evaluate (jas-eval (fak 5) initial-env) -- You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||