DataStructure 呼び出しを単純にラップすると、AggressiveInlining の効果を確認できません
例えば:
public class WList
{
   //made static just to check inlining
   //otherwise inlining might not kick in since 'this' keyword will disallow it
   static System.Collections.ArrayList list;
   [MethodImpl(MethodImplOptions.AggressiveInlining)]
   public override void Put(object item)
   {
       WList.list.Add(item);
   }
}
そして、これを行います
    //Add 1000000 number of items in the list
    //Run this test many times 
    for (int j = 0; j < 100; j++)
    {
        Stopwatch sw = new Stopwatch();
        sw.Start();
        for (int i = 0; i < length; i++)
        {
            //ADD ITEMS IN A SIMPLE ARRAY LIST
            arraylist.Add(emptyobject);
        }
        sw.Stop();
        //clear the list
    }
    //Do similar test on wrapper
    for (int j = 0; j < 100; j++)
    {
        Stopwatch sw = new Stopwatch();
        sw.Start();
        for (int i = 0; i < length; i++)
        {
            //ADD ITEMS IN ARRAY LIST THROUGH WRAPPER
            wrapperList.Put(emptyobject);
        }
        sw.Stop();
        //clear the list
    }
Inlinig は基本的に関数をアンラップし、内部コードを外部に配置することになっていますが、ラッパーから得られる数値は直接呼び出しよりも遅くなります。
Hastable が使用されている場合、または add の代わりに get 呼び出しが使用されている場合、数値は同じままです。
関数呼び出しのパフォーマンス コストはそのままです。