daily update on 20240207 by nitload youmu

This commit is contained in:
Nitload
2024-02-07 13:47:12 +08:00
parent 8548757bbf
commit 6fe6b3b3cf
37 changed files with 231 additions and 196 deletions
+8 -24
View File
@@ -14,32 +14,16 @@ namespace BenchMark
static void Main(string[] args)
{
Calculator c = new Calculator();
c.PtrSub();
var sum = BenchmarkRunner.Run(typeof(Calculator).Assembly);
uint[] array = new uint[] { 0, 10, 2, 3 };
fixed (uint* ptr = array)
{
IntPtr p = (IntPtr)ptr;
Console.WriteLine(*((uint*)p + 1));
}
}
}
public struct Calculator
{
public static int Sub(int left, int right)
{
return left - right;
}
[Benchmark]
public unsafe void DeleSub()
{
Func<int, int, int> SubDele = Sub;
SubDele(1, 0);
}
[Benchmark]
public unsafe void PtrSub()
{
delegate*<int, int, int> SubPtr = &Sub;
SubPtr(1, 0);
}
}
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -14,7 +14,7 @@ using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("BenchMark")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+5d778e0f2f6e677453cebc990919697968c771f9")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+8548757bbf17cb04ef554babef5b140fd02c1f53")]
[assembly: System.Reflection.AssemblyProductAttribute("BenchMark")]
[assembly: System.Reflection.AssemblyTitleAttribute("BenchMark")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
@@ -1 +1 @@
a69f4baa1be073def38e9acf0067382f3fca5213a8a52e99918a4b8263c622a4
82cb96ae7382da519b6703c815654474e1b0440eedcbbdfb523d786d8786efff
Binary file not shown.
Binary file not shown.
@@ -1 +1 @@
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/5d778e0f2f6e677453cebc990919697968c771f9/*"}}
{"documents":{"D:\\NitloadIndustry\\研究项目\\1-Flagship\\TH2020\\ProjectFile\\*":"https://raw.githubusercontent.com/Nitload-NSI/CCD_Github/8548757bbf17cb04ef554babef5b140fd02c1f53/*"}}
Binary file not shown.