‹ BackHN Continuity

Thread

Performance Improvements in .NET 11

349 points · 112 comments · soheilpro

  1. momocowcow · · focus · HN ↗
    casey muratori would like to have a talk with you about the following :))

        // Approximately what the JIT generates
        if (animal?.GetType() == typeof(Dog))
        {
            ((Dog)animal).Speak();  // devirtualized, inlinable
        }
        else
        {
            animal.Speak(); // original virtual call, hopefully rare
        }
    1. kg · · focus · HN ↗
      You can always just not use OOP. C#'s tooling for functional programming and C-style programming is really good, thanks to stuff like statics on interfaces or spans.
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.