[racket] translate from Racket to Common Lisp

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Sun Nov 4 12:01:25 EST 2012

What Matthew and everyone else said is critical. Read those 
before reading on. Also consider using optimizations in Racket
or converting to TR and asking for fixed-point numbers. 

;; --- 

However, we do understand the need for running programs in both worlds
(Racke and CL). An alternative is to write a program so that it basically 
ports itself (with a few tweaks). 

For years, Dorai Sitaram maintained a macro/constraint set for just 
this purpose. The idea is written down in a short Scheme Workshop


Producing a #lang cl/port for this purpose would be a 'good thing'.
Others may benefit too. You could contribute it to Planet. 

-- Matthias

On Nov 4, 2012, at 8:20 AM, Matthew Flatt wrote:

> At Fri, 2 Nov 2012 16:25:09 +0000 (UTC), daniel rupistraliz avez wrote:
>>  One motivation is speed, for example a recent example in the racket blog about
>> the 2n+1 problem gives 1200 milliseconds in Racket and 500 in sbcl (without
>> declaring fixnum or any other optimization).
> Although it's not really your question, I'm generally interested in
> understanding performance differences. Can you tell me more about what
> you're measuring, and maybe provide the SBCL version of the code that
> you're using?
> If I take Danny's code form the blog and just try
>  time racket three-n-plus-one.rkt < sample-data.txt
> on the command line, it takes 720 millisecond on my machine, but
> essentially all of that time is loading and compiling the code.
> Wrapping `time' around the body of the `main' submodule shows that the
> actual computation takes only 2 milliseconds.
> If I try
> raco make three-n-plus-one.rkt 
> time racket three-n-plus-one.rkt < sample-data.txt
> then the overall time drops down to 264 milliseconds. Some other
> changes can reduce the start-up time further, but I don't know if this
> is at all related the way you're measuring performance.
> So, I wonder whether you're using different inputs and how you're
> measuring the run time.
> Thanks!
> ____________________
>  Racket Users list:
>  http://lists.racket-lang.org/users

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4373 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20121104/9721140b/attachment.p7s>

Posted on the users mailing list.