Skip to content

Instantly share code, notes, and snippets.

Avatar

Adam Sitnik adamsitnik

View GitHub Profile
View MMFS.cs
using Microsoft.Win32.SafeHandles;
using System.Diagnostics;
using System.IO.MemoryMappedFiles;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Security.AccessControl;
using System.Security.Principal;
namespace MMFS
{
View nativeaotPreview4.md

Legend

  • Statistical Test threshold: 10%, the noise filter: 2 ns
  • Result is conclusion: Slower|Faster|Same|Noise|Unknown. Noise means that the difference was larger than 10% but not 2 ns.
  • Base is median base execution time in nanoseconds for net7.0-preview4
  • Diff is median diff execution time in nanoseconds for nativeaot7.0-preview4
  • Ratio = Base/Diff (the higher the better).
  • Alloc Delta = Allocated bytes diff - Allocated bytes base (the lower the better)

Statistics

View net7.0-preview3
This file has been truncated, but you can view the full file.
# Legend
* Statistical Test threshold: 10%, the noise filter: 2 ns
* Result is conclusion: Slower|Faster|Same|Noise|Unknown. Noise means that the difference was larger than 10% but not 2 ns.
* Base is median base execution time in nanoseconds for net7.0-preview2
* Diff is median diff execution time in nanoseconds for net7.0-preview3
* Ratio = Base/Diff (the higher the better).
* Alloc Delta = Allocated bytes diff - Allocated bytes base (the lower the better)
View net7.0-preview3
This file has been truncated, but you can view the full file.
# Legend
* Statistical Test threshold: 10%, the noise filter: 2 ns
* Result is conclusion: Slower|Faster|Same|Noise|Unknown. Noise means that the difference was larger than 10% but not 2 ns.
* Base is median base execution time in nanoseconds for net7.0-preview2
* Diff is median diff execution time in nanoseconds for net7.0-preview3
* Ratio = Base/Diff (the higher the better).
* Alloc Delta = Allocated bytes diff - Allocated bytes base (the lower the better)
View Perf.csproj
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<TrimMode>link</TrimMode>
<IlcGenerateCompleteTypeMetadata>True</IlcGenerateCompleteTypeMetadata>
<IlcGenerateStackTraceData>True</IlcGenerateStackTraceData>
<EnsureNETCoreAppRuntime>false</EnsureNETCoreAppRuntime>
View NamedPipesHelloWorld.cs
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Pipes;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace NamedPipes
{
View slownfs.json
{"exporter": "Microsoft.Diagnostics.Tracing.TraceEvent@2.0.69.0", "name": "slowNfs.speedscope", "activeProfileIndex": 0, "$schema": "https://www.speedscope.app/file-format-schema.json", "shared": { "frames": [ { "name": "Process NfsTest (12648)" }, { "name": "Thread (12648)" }, { "name": "libc.so.6!sendfile" }, { "name": "kernel.kallsyms!entry_SYSCALL_64_after_hwframe" }, { "name": "kernel.kallsyms!do_syscall_64" }, { "name": "kernel.kallsyms!__x64_sys_sendfile64" }, { "name": "kernel.kallsyms!do_sendfile" }, { "name": "kernel.kallsyms!do_splice_direct" }, { "name": "kernel.kallsyms!splice_direct_to_actor" }, { "name": "kernel.kallsyms!direct_splice_actor" }, { "name": "kernel.kallsyms!iter_file_splice_write" }, { "name": "kernel.kallsyms!vfs_iter_write" }, { "name": "kernel.kallsyms!do_iter_write" }, { "name": "kernel.kallsyms!do_iter_readv_writev" }, { "name": "kernel.kallsyms!ext4_file_write_iter" }, { "name": "kernel.kallsyms!ext4_buffered_write_iter" }, { "name": "kernel.kallsyms!generic_perform_write" }
View macos.speedscope
{"exporter": "Microsoft.Diagnostics.Tracing.TraceEvent@2.0.69.0", "name": "macos.speedscope", "activeProfileIndex": 0, "$schema": "https://www.speedscope.app/file-format-schema.json", "shared": { "frames": [ { "name": "Process64 Process(8725) (8725) Args: " }, { "name": "Thread (26985)" }, { "name": "05aac6f8-2aca-4b6b-8a12-701da040ede3!BenchmarkDotNet.Autogenerated.UniqueProgramName.Main(class System.String[])" }, { "name": "05aac6f8-2aca-4b6b-8a12-701da040ede3!BenchmarkDotNet.Autogenerated.UniqueProgramName.AfterAssemblyLoadingAttached(class System.String[])" }, { "name": "System.Private.CoreLib!System.Reflection.MethodBase.Invoke(class System.Object,class System.Object[])" }, { "name": "System.Private.CoreLib!System.Reflection.RuntimeMethodInfo.Invoke(class System.Object,value class System.Reflection.BindingFlags,class System.Reflection.Binder,class System.Object[],class System.Globalization.CultureInfo)" }, { "name": "?!?" }, { "name": "05aac6f8-2aca-4b6b-8a12-701da040ede3!BenchmarkDotNet.Autogenerated.Ru
View CpuIds.cs
using Microsoft.Win32.SafeHandles;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Runtime.InteropServices;
namespace CpuSet
{
internal class Program
{
View net50.speedscope.json
{"exporter": "Microsoft.Diagnostics.Tracing.TraceEvent@2.0.69.0", "name": "net50.speedscope", "activeProfileIndex": 0, "$schema": "https://www.speedscope.app/file-format-schema.json", "shared": { "frames": [ { "name": "Process64 dotnet (29392) Args: \"d385fd24-fe47-4c7a-85ff-eb5ebc8c2af2.dll\" --benchmarkName \"System.Text.Tests.Perf_StringBuilder.ctor_capacity(length: 100000)\" --job \"PowerPlanMode=00000000-0000-0000-0000-000000000000, Arguments=/p:DebugType=portable,-bl:benchmarkdotnet.binlog, InvocationCount=75088, IterationCount=20, IterationTime=250.0000 ms, MaxIterationCount=20, MinIterationCount=15, WarmupCount=1\" --benchmarkId 0" }, { "name": "Thread (18728) CPU=6888ms (Startup Thread)" }, { "name": "ntdll!RtlUserThreadStart" }, { "name": "kernel32!BaseThreadInitThunk" }, { "name": "dotnet!__scrt_common_main_seh" }, { "name": "dotnet!wmain" }, { "name": "dotnet!exe_start" }, { "name": "hostfxr!hostfxr_main_startupinfo" }, { "name": "hostfxr!fx_muxer_t::execute" }, { "name": "hostfxr!fx_muxer_t::han