<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Late-bound invocation notes - CallVirt, Delegates, DynamicMethod, InvokeMember.</title><link>http://blogs.msdn.com/joelpob/archive/2004/04/01/105862.aspx</link><description>I've been cooking up some notes on the ways one may do late-bound or dynamic invocation. It's unpolished, but hopefully you can dig yourself out of the weeds to get something out of it. Don't expect it to be complete, but if there's enough interest, I'll</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>re: Late-bound invocation notes - CallVirt, Delegates, DynamicMethod, InvokeMember.</title><link>http://blogs.msdn.com/joelpob/archive/2004/04/01/105862.aspx#105966</link><pubDate>Thu, 01 Apr 2004 23:00:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:105966</guid><dc:creator>Dominic Cooney</dc:creator><description>Some quick questions:&lt;br&gt;&lt;br&gt;You mention that using LCG to put arguments on the stack is &amp;quot;orders of magnitude faster&amp;quot;-- can you quantify this? And what about the overhead of the one-off LCG to generate the stub? What do you think the implications of LCG for e.g. JScript or IronPython are?&lt;br&gt;&lt;br&gt;In theory, can't I define a delegate B Arrow&amp;lt;A,B&amp;gt;(A arg) (and so on for methods with more arguments) and get better typing to boot? What is the relative efficiency of this? And will the BCL have built-in Arrow&amp;lt;A,B&amp;gt; and Tuple&amp;lt;...&amp;gt; types?&lt;br&gt;&lt;br&gt;Lastly, a couple of general LCG questions: Can I use LCG e.g. to emit wrappers that do security assertions or something like that? And how does LCG work in long-running processes, or where you use LCG a lot-- is LCG-generated code GCed?</description></item><item><title>New and Notable 41</title><link>http://blogs.msdn.com/joelpob/archive/2004/04/01/105862.aspx#106320</link><pubDate>Fri, 02 Apr 2004 15:52:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:106320</guid><dc:creator>Sam Gentile's Blog</dc:creator><description /></item><item><title>New and Notable 41</title><link>http://blogs.msdn.com/joelpob/archive/2004/04/01/105862.aspx#106327</link><pubDate>Fri, 02 Apr 2004 15:52:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:106327</guid><dc:creator>Sam Gentile's Blog</dc:creator><description /></item><item><title>And I'd like to thank Joel...</title><link>http://blogs.msdn.com/joelpob/archive/2004/04/01/105862.aspx#107669</link><pubDate>Mon, 05 Apr 2004 14:54:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:107669</guid><dc:creator>Dominic Cooney's Weblog</dc:creator><description /></item><item><title>Joel's Lightweight Code Gen spells SUWEET for small scripting languages in games.</title><link>http://blogs.msdn.com/joelpob/archive/2004/04/01/105862.aspx#110902</link><pubDate>Sat, 10 Apr 2004 21:46:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:110902</guid><dc:creator>Justin Rogers, DigiTec Web Consultants, LLC.</dc:creator><description /></item><item><title>Exploring Late-Bound Invocation</title><link>http://blogs.msdn.com/joelpob/archive/2004/04/01/105862.aspx#112443</link><pubDate>Tue, 13 Apr 2004 20:51:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:112443</guid><dc:creator>Cook Computing</dc:creator><description>I recently mentioned Joel Pobar's posting on Late-Bound Invocation and over the weekend I did some investigation into what the performance is like for the various methods he describes. The spur for this was reading about the JVM-based scripting language...</description></item><item><title>Eric Gunnerson's article</title><link>http://blogs.msdn.com/joelpob/archive/2004/04/01/105862.aspx#112604</link><pubDate>Tue, 13 Apr 2004 21:51:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:112604</guid><dc:creator>Dumky</dc:creator><description>Eric Gunnerson has an article on MSDN comparing the perf for these different approaches, and what Whidbey should improve:&lt;br&gt;&lt;a target="_new" href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncscol/html/csharp02172004.asp"&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncscol/html/csharp02172004.asp&lt;/a&gt;&lt;br&gt;</description></item><item><title>re: Late-bound invocation notes - CallVirt, Delegates, DynamicMethod, InvokeMember.</title><link>http://blogs.msdn.com/joelpob/archive/2004/04/01/105862.aspx#112635</link><pubDate>Tue, 13 Apr 2004 22:33:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:112635</guid><dc:creator>Joel Pobar</dc:creator><description>Firstly, thanks to Charles for the performance numbers. I hadn't had a chance to get to them myself. The delegate and DynamicMethod PDC bits will be slightly less performant than the next community drop, so expect the numbers to change a little. There's also mention of the cost of generating the DynamicMethod - yes, absolutely, there's a working set hit with the introduction of the JIT. &lt;br&gt;&lt;br&gt;Secondly, I also need to clean up the example a little more. I tried to blend both performance and type checking aspects in to the example, but it ended up just looking kludgy, as you can see. &lt;br&gt;&lt;br&gt;Thirdly, there's a bunch of things I didn't explain. I should really go away and cook up another blog post, but I'll dump here for now. Clearly, the scenario is what drives the choice in invocation path. In this particular case, having full knowledge of the receiver gave us a clear performance win. Unfortunately, as with most common dynamic scenario's, you never generally have full knowledge of anything. With this statement, comes a whole load of baggage. Signature checks, type checks, receiver checks - sounds a little like what Invoke member is for doesn't it? &lt;br&gt;&lt;br&gt;There's a whole range of scenario's I haven't touched on here, some include: &lt;br&gt;- You know the signature of the method to invoke, but you don't know the name or the receiver.&lt;br&gt;- You know the signature and the name, but not the receiver&lt;br&gt;- You know the name, but not the signature &lt;br&gt;Perhaps my next blog post will touch on these - seems like I've opened a can of worms so it might just be worthwhile. &lt;br&gt;&lt;br&gt;Lastly, Dominic had a question about LCG in long-running processes. The long and the short of it is, LCG is GC'ed, there's the reclaimation story. So definitely think about holding on to that handle if you care about throughput. &lt;br&gt;&lt;br&gt;That's enough dumping for now. Leave me a comment if you'd like a blog story for all this. =)</description></item><item><title>More late-bound invocation scenario notes</title><link>http://blogs.msdn.com/joelpob/archive/2004/04/01/105862.aspx#119172</link><pubDate>Fri, 23 Apr 2004 23:47:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:119172</guid><dc:creator>Joel Pobar's weblog</dc:creator><description /></item><item><title>Improvements to System.Reflection in VS2005</title><link>http://blogs.msdn.com/joelpob/archive/2004/04/01/105862.aspx#158378</link><pubDate>Thu, 17 Jun 2004 20:19:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:158378</guid><dc:creator>Something Clever</dc:creator><description>Visual Studio 2005 will contain some exciting enhancements to the System.Reflection namespace.</description></item><item><title>What's new in System.Reflection (and friends)</title><link>http://blogs.msdn.com/joelpob/archive/2004/04/01/105862.aspx#163209</link><pubDate>Wed, 23 Jun 2004 08:21:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:163209</guid><dc:creator>Joel Pobar's weblog</dc:creator><description /></item><item><title>System.Reflection in Whidbey</title><link>http://blogs.msdn.com/joelpob/archive/2004/04/01/105862.aspx#163706</link><pubDate>Wed, 23 Jun 2004 18:22:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:163706</guid><dc:creator>Mike Taulty's Weblog</dc:creator><description /></item><item><title>What's new in System.Reflection (and friends)</title><link>http://blogs.msdn.com/joelpob/archive/2004/04/01/105862.aspx#163867</link><pubDate>Wed, 23 Jun 2004 20:37:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:163867</guid><dc:creator>Joel Pobar's weblog</dc:creator><description /></item><item><title>I know the token but...calli &amp; newobj</title><link>http://blogs.msdn.com/joelpob/archive/2004/04/01/105862.aspx#209831</link><pubDate>Fri, 06 Aug 2004 13:49:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:209831</guid><dc:creator>Alan Cyment</dc:creator><description>What about building a special purpose &amp;quot;dynamic calling assembly&amp;quot; with an only class/method, programmed in plain IL, that takes a RuntimeMethodHandle instance and an Object[] as parameters, does the stack pushing and finally invokes via &amp;quot;calli&amp;quot;? I'm planning to take this road in my dynamic invocation scenario (I know the method token when trying to do the calling), but, as far as I have read, there's no way to do an &amp;quot;indirect newobj&amp;quot; constructor call. Isn't there an equivalente to calli that allocates memory for a new object? not even in Whidbey?&lt;br&gt;&lt;br&gt;TIA,&lt;br&gt;Alan</description></item><item><title>Lightweight Code Generation </title><link>http://blogs.msdn.com/joelpob/archive/2004/04/01/105862.aspx#404351</link><pubDate>Fri, 01 Apr 2005 01:28:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:404351</guid><dc:creator>菊池 Blog</dc:creator><description>Lightweight Code Generation </description></item><item><title>CLR Dynamic languages under the hood (Part 1 of many)</title><link>http://blogs.msdn.com/joelpob/archive/2004/04/01/105862.aspx#434731</link><pubDate>Fri, 01 Jul 2005 21:44:05 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:434731</guid><dc:creator>Joel Pobar's CLR weblog</dc:creator><description>There seems to be a fair amount of recent press and blog action surrounding the dynamic or “scripting”...</description></item><item><title>CLR Dynamic languages under the hood (Part 1 of many)</title><link>http://blogs.msdn.com/joelpob/archive/2004/04/01/105862.aspx#434736</link><pubDate>Fri, 01 Jul 2005 21:48:09 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:434736</guid><dc:creator>Joel Pobar's CLR weblog</dc:creator><description>There seems to be a fair amount of recent press and blog action surrounding the dynamic or “scripting”...</description></item><item><title>Activator.CreateInstance and beyond</title><link>http://blogs.msdn.com/joelpob/archive/2004/04/01/105862.aspx#560547</link><pubDate>Sat, 25 Mar 2006 04:45:53 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:560547</guid><dc:creator>Haibo Luo's weblog</dc:creator><description> &amp;nbsp; &amp;nbsp;&lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Q: Assume we have 2000 unknown types; (however) we know each type has a constructor&lt;br&gt; ...</description></item><item><title>DebuggerVisualizer for DynamicMethod (Show me the IL)</title><link>http://blogs.msdn.com/joelpob/archive/2004/04/01/105862.aspx#805662</link><pubDate>Sun, 08 Oct 2006 21:59:17 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:805662</guid><dc:creator>Haibo Luo's weblog</dc:creator><description>&lt;p&gt;Have you ever tried DynamicMethod, one of the coolest features in the .NET 2.0? Hope you have; otherwise,&lt;/p&gt;
</description></item><item><title>How Silverlight supports dynamic languages</title><link>http://blogs.msdn.com/joelpob/archive/2004/04/01/105862.aspx#2362364</link><pubDate>Tue, 01 May 2007 23:17:45 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:2362364</guid><dc:creator>Christian Weyer: Smells like service spirit</dc:creator><description>&lt;p&gt;I am not at this conference, but anyway...What I was wondering is how Silverlight does support these...&lt;/p&gt;
</description></item><item><title> Joel Pobar s CLR weblog Late bound invocation notes CallVirt | Cast Iron Cookware</title><link>http://blogs.msdn.com/joelpob/archive/2004/04/01/105862.aspx#9641874</link><pubDate>Tue, 26 May 2009 21:30:13 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9641874</guid><dc:creator> Joel Pobar s CLR weblog Late bound invocation notes CallVirt | Cast Iron Cookware</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://castironbakeware.info/story.php?title=joel-pobar-s-clr-weblog-late-bound-invocation-notes-callvirt"&gt;http://castironbakeware.info/story.php?title=joel-pobar-s-clr-weblog-late-bound-invocation-notes-callvirt&lt;/a&gt;&lt;/p&gt;
</description></item><item><title> Joel Pobar s CLR weblog Late bound invocation notes CallVirt | Indoor Grills</title><link>http://blogs.msdn.com/joelpob/archive/2004/04/01/105862.aspx#9675515</link><pubDate>Mon, 01 Jun 2009 10:56:28 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9675515</guid><dc:creator> Joel Pobar s CLR weblog Late bound invocation notes CallVirt | Indoor Grills</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://indoorgrillsrecipes.info/story.php?id=2362"&gt;http://indoorgrillsrecipes.info/story.php?id=2362&lt;/a&gt;&lt;/p&gt;
</description></item><item><title> Joel Pobar s CLR weblog Late bound invocation notes CallVirt | Insomnia Cure</title><link>http://blogs.msdn.com/joelpob/archive/2004/04/01/105862.aspx#9710106</link><pubDate>Tue, 09 Jun 2009 01:16:59 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:9710106</guid><dc:creator> Joel Pobar s CLR weblog Late bound invocation notes CallVirt | Insomnia Cure</dc:creator><description>&lt;p&gt;PingBack from &lt;a rel="nofollow" target="_new" href="http://insomniacuresite.info/story.php?id=8012"&gt;http://insomniacuresite.info/story.php?id=8012&lt;/a&gt;&lt;/p&gt;
</description></item></channel></rss>