[mercury-users] Re: GC and tail calls (was: Many data elements using Mercury on Cygwin?)
Douglas Auclair
dauclair at msn.com
Fri Feb 7 03:44:32 AEDT 2003
Dear Fergus,
Thanks for your response.
From: Fergus Henderson (fjh at cs.mu.oz.au)
>There is no `--asm-fast' option.
>Are you using `--grade asm_fast'? Or `--grade asm_fast.gc'? If you are
>using `--grade asm_fast', then you have turned off garbage collection.
I'm using --grade asm_fast ... I have not been successful in building ANY
version of the Mercury compiler on cygwin (although it's been easy on other
platforms; see messages in mercury-developers), so I am relying on the
binary version I downloaded from your site (I had downloaded the binary
version just when 0.11.0 was release, so there was no 0.11.0 versions
available at that time). So, I'm eagerly anticipating using version 0.11.0,
and I hope it comes with precompiled gc versions.
>The sizes of the Mercury stacks and heap can be set using the
>MERCURY_OPTIONS environment variable (see the "Environment variables"
>chapter of the Mercury User's Guide) or the --runtime-flags linker >option.
Great! That's what I need to know. Thanks for that information.
>If adjusting the stack size does make the problem go away, then you might
>be able to eliminate the problem completely by rewriting your main loop(s)
>to be tail recursive, so that they do not consume stack space proportional
>to the size of the input.
If one does some source-to-source transformations, my code is
tail-recursive. Translation: I do tail-calls, but not necessarily
tail-recursive-calls; is the compiler smart enough to optimize tail calls?
Is there a way ON CYGWIN to profile the code so I can see if I'm doing tail
calls and that the compiler's picking that up?
Sincerely,
Doug Auclair
_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8.
http://join.msn.com/?page=features/junkmail
--------------------------------------------------------------------------
mercury-users mailing list
post: mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the users
mailing list