On Jan 24, 2006, at 6:51 PM, Joel Reymont wrote:
I have Gambit 4b17 and I cannot compile syntax-case.scm with gcc 4.0 for some reason. It sits there forever doing something and gcc eats up 700Mb+ of memory. I'm on Mac OSX 10.4.4.
If you copy gambit.h to the directory where you compile syntax- case.scm and add
[lindv2:~/Desktop] lucier% diff -p /usr/local/Gambit-C/include/ gambit.h gambit.h *** /usr/local/Gambit-C/include/gambit.h Thu Jan 19 15:17:50 2006 --- gambit.h Wed Jan 25 13:03:48 2006 *************** *** 1192,1197 **** --- 1192,1198 ---- * Determine optimization goal. */
+ #define ___OPTIMIZE_SPACE #ifdef ___OPTIMIZE_TIME #ifdef ___OPTIMIZE_SPACE @error "Define either ___OPTIMIZE_TIME or ___OPTIMIZE_SPACE"
to it, and change the declarations in syntax-case.scm to
(##declare (standard-bindings) (extended-bindings) (block) (not inline) (inlining-limit 0) (mostly-generic) )
then you get
[lindv2:~/Desktop] lucier% time gsc -dynamic syntax-case.scm 128.354u 17.284s 3:20.60 72.5% 0+0k 0+50io 0pf+0w
instead of
[lindv2:~/Desktop] lucier% time gsc -dynamic syntax-case.scm 309.737u 47.772s 7:22.84 80.7% 0+0k 1+59io 0pf+0w
and gcc requires 700 MB of memory instead of 1.25 GB. If you'll have only fixnum renamed variables in your code and you assume that there aren't any errors in the syntax-case code you can try
(##declare (standard-bindings) (extended-bindings) (block) (not inline) (inlining-limit 0) (fixnum) (not safe) )
and gcc will require about 600 MB and you'll have a time of
time gsc -dynamic syntax-case.scm 97.977u 13.132s 2:38.54 70.0% 0+0k 0+49io 0pf+0w
Brad