[MLton] MLton calling convention and closure conversion
    skaller 
    skaller at users.sourceforge.net
       
    Mon Jan 22 20:42:15 PST 2007
    
    
  
On Tue, 2007-01-23 at 01:08 +0100, Wesley W. Terpstra wrote:
> I wanted to make sure I understand these issues before I spread  
> misinformation:
> 
> As I understand it, gcc doesn't do tail recursion very well, because  
> it is the caller's responsibility to pop the stack; the callee does  
> not know the number of arguments passed to the function.
What you say is true in modern ISO C *only* for functions which 
have variable argument lists, such as 'printf'.
More particularly it isn't the performance of gcc that matters
as much as the ABI it must conform to. 
Linux/AMD64 seems to allow tail calls:
http://felix.sourceforge.net/speed/en_flx_perf_0005.html
shows Felix, gcc, and gnat outperform Ocaml, which
definitely implements them. Mlton will be hard 
pressed to do better here.
-- 
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net
    
    
More information about the MLton
mailing list