Skip to content

Instantly share code, notes, and snippets.

@LanceMcCarthy
LanceMcCarthy / MauiProgram.cs
Last active December 29, 2024 05:14
Mica support in .NET MAUI
// ************************************************************************ //
// This implementation is inspired from the official WinUI3 backdrops examples
// https://github.com/microsoft/WinUI-Gallery/blob/winui3/XamlControlsGallery/ControlPagesSampleCode/SystemBackdrops/SystemBackdropsSample2.txt
// *********************************************************************** //
using Microsoft.Maui.LifecycleEvents;
#if WINDOWS10_0_17763_0_OR_GREATER
// The namespace of where the WindowsHelpers class resides
// In older versions of .NET MAUI, this was
@EgorBo
EgorBo / Dynamic PGO in .NET 6.0.md
Last active January 13, 2025 11:13
Dynamic PGO in .NET 6.0.md

Dynamic PGO in .NET 6.0

Dynamic PGO (Profile-guided optimization) is a JIT-compiler optimization technique that allows JIT to collect additional information about surroundings (aka profile) in tier0 codegen in order to rely on it later during promotion from tier0 to tier1 for hot methods to make them even more efficient.

What exactly PGO can optimize for us?

  1. Profile-driving inlining - inliner relies on PGO data and can be very aggressive for hot paths and care less about cold ones, see dotnet/runtime#52708 and dotnet/runtime#55478. A good example where it has visible effects is this StringBuilder benchmark:

  2. Guarded devirtualization - most monomorphic virtual/interface calls can be devirtualized using PGO data, e.g.:

void DisposeMe(IDisposable d)
@dn1t
dn1t / example.js
Last active September 27, 2021 07:10
솔브인코딩
textToSolve('솔바브보') // 바보바보바보솔브바보바보솔브솔브바보솔브솔브솔브솔브바보바보솔브바보솔브솔브바보솔브바보솔브솔브바보바보바보솔브바보솔브바보바보바보솔브바보바보솔브솔브솔브솔브바보솔브솔브바보솔브바보솔브솔브바보바보바보솔브바보솔브바보바보바보솔브바보바보바보솔브솔브솔브바보솔브솔브솔브바보바보솔브솔브바보바보바보솔브바보솔브바보바보바보솔브바보바보솔브솔브바보바보바보솔브바보바보솔브바보솔브솔브
solveToText('바보바보바보솔브바보바보솔브솔브바보솔브솔브솔브솔브바보바보솔브바보솔브솔브바보솔브바보솔브솔브바보바보바보솔브바보솔브바보바보바보솔브바보바보솔브솔브솔브솔브바보솔브솔브바보솔브바보솔브솔브바보바보바보솔브바보솔브바보바보바보솔브바보바보바보솔브솔브솔브바보솔브솔브솔브바보바보솔브솔브바보바보바보솔브바보솔브바보바보바보솔브바보바보솔브솔브바보바보바보솔브바보바보솔브바보솔브솔브') // 솔바브보