Dejan, Sorry for the slow reply.
Firstly, I'm not an authority on the CLR, Rotor or the JIT. However my understanding is that, because the callee can have different arguments to the caller, etc., the 'record' that contains information about these (which I am calling the 'activation record', although Jim Hogg correctly points on that this structure exist in native code, and conceptually in the VM) of the caller must be replaced by that of the callee. Jmp presumably doesn't need to swap them. The restrictions on jmp in Partition III Section 3.37 are: "The calling convention, number and type of arguments at the destination address must match that of the current method." If you're really curious, I'd try and get in touch with someone knowledgeable about the CLR, and download Rotor and look at what the JIT does when a tail hint is encountered. Dominic -----Original Message----- From: Moderated discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED]] On Behalf Of Dejan Jelovic Sent: Saturday, 25 January 2003 1:31 AM To: [EMAIL PROTECTED] Subject: Re: [ADVANCED-DOTNET] tailcall speed Dominic Cooney wrote: > Tail calling is apparently slow because the activation > records of the old and new method have to be swapped. > Conversely, jmp should be quite fast. I'm lost. What's an "activation record"? Also, does that swapping you are describing need to be done when one is calling the same function recursively? Dejan www.jelovic.com You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.
