You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using System;
using System.Reflection;
using System.Reflection.Emit;
using BenchmarkDotNet.Attributes;
public class Bench
{
Func<RuntimeMethodHandle> d = Init();
static Func<RuntimeMethodHandle> Init()
{
DynamicMethod dm = new DynamicMethod("My", typeof(RuntimeMethodHandle), null, typeof(string).Module);
MethodInfo randomMethod = typeof(object).GetMethod("ReferenceEquals");
ILGenerator il = dm.GetILGenerator();
il.Emit(OpCodes.Ldtoken, randomMethod);
il.Emit(OpCodes.Ret);
return dm.CreateDelegate<Func<RuntimeMethodHandle>>();
}
[Benchmark]
public RuntimeMethodHandle LdToken() => d();
}
(EgorBot will reply in this issue)
The text was updated successfully, but these errors were encountered:
Processing dotnet/runtime#111088 (comment) command:
Command
-windows_intel
(EgorBot will reply in this issue)
The text was updated successfully, but these errors were encountered: