Skip to content

Instantly share code, notes, and snippets.

View airbreather's full-sized avatar
💭
Wondering why there's a "Set status" button.

Joe Amenta airbreather

💭
Wondering why there's a "Set status" button.
  • Urban Science Applications, Inc.
  • Sterling Heights, Michigan, USA
View GitHub Profile
@EgorBo
EgorBo / Dynamic PGO in .NET 6.0.md
Last active January 25, 2024 15:15
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)
@PanickedKernel
PanickedKernel / InvTweaksTree
Last active December 20, 2015 03:39
A customized InvTweaksTree.txt for the Hexxit modpack (technicpack.com)
<?xml version="1.0" encoding="utf-8" ?>
<!--
|==============================================================|
| INVENTORY TWEAKS Mod - By Jimeo Wan (jimeo.wan at gmail.com) |
| Tree configuration |
|==============================================================|
# Q: WHAT IS THIS?
# A: This file is used to store all the keywords you can use to create item rules, but also to define the items order.
# You can move/change all that you want, but it's recommended not to delete any default item.