chicken-hackers
[Top][All Lists]
Advanced

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

[Chicken-hackers] [PATCH] Fix numbers-string-conversion-tests compilatio


From: Peter Bex
Subject: [Chicken-hackers] [PATCH] Fix numbers-string-conversion-tests compilation time
Date: Thu, 8 Mar 2012 21:52:43 +0100
User-agent: Mutt/1.4.2.3i

Hi all,

I was messing around with the numbers test some more and realised
that using a macro which expands to many many forms is completely
ridiculous and unneccessary for the test after all (the only thing
the macro needs to do is catch the values and put them in a list).

By putting the actual checks and error messages in a helper procedure
the compiler needs to do a lot less work, since each line of the
tests now expands into one call instead of dozens of calls.

I've fixed the numbers egg's tests so they compile in 50 seconds
instead of 1 minute and 45 seconds.  The attached patch does the
same for the copy of this test in the Chicken core codebase, for
which the time goes down from about 47 seconds to 3 seconds.

I've decided to restore compilation instead of interpretation for
this test, since it *might* catch some literal representation bugs,
and possibly specialization bugs too, and it's now acceptably fast.
If it's still too slow that needs to be fixed.

Cheers,
Peter
-- 
http://sjamaan.ath.cx
--
"The process of preparing programs for a digital computer
 is especially attractive, not only because it can be economically
 and scientifically rewarding, but also because it can be an aesthetic
 experience much like composing poetry or music."
                                                        -- Donald Knuth

Attachment: 0001-Change-numbers-string-conversion-test-to-use-a-helpe.patch
Description: Text document


reply via email to

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