Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. .Net 5 Performance Improvements

.Net 5 Performance Improvements

Scheduled Pinned Locked Moved .NET (Core and Framework)
csharpperformanceannouncementcssasp-net
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    GerVenson
    wrote on last edited by
    #1

    Hey, A bit backstory: I am working for some time on my Text-Templating engine project Morestachio and all the time i compare the performance of Morestachio against other engines like cottle, handlebars.net, scribain etc and with the latest release of .Net5 i was thrilled as microsoft promised another out-of-the-box performance improvement like the one we saw when net.core came out where each version was measurably faster then the previous one. I read some block posts like this one: [Performance Improvements in .NET 5 | .NET Blog](https://devblogs.microsoft.com/dotnet/performance-improvements-in-net-5/) but when i did my usual performance comparisons I discovered more or less the opposite. I have two performance metrics: Historical performance tests including only Morestachio using Nunit and a project using the BenchmarkDotNet lib. BenchmarkDotNet: .net472:

    Method Mean Error StdDev Gen 0 Gen 1 Gen 2 Allocated
    Bench 2.019 ms 0.0041 ms 0.0036 ms 257.8125 15.6250 - 1.57 MB

    .NET5:

    Method Mean Error StdDev Gen 0 Gen 1 Gen 2 Allocated
    Bench 2.219 ms 0.0044 ms 0.0039 ms 85.9375 3.9063 - 705.5 KB

    .NetCore 3.1:

    Method Mean Error StdDev Gen 0 Gen 1 Gen 2 Allocated
    Bench 1.427 ms 0.0035 ms 0.0033 ms 95.7031 5.8594 - 783.67 KB

    this also performance difference is also present in the other test (i will not bother to post here). Yes Net5 is way more efficient in memory consumption but in comparison slower then even pre NetCore.

    L 1 Reply Last reply
    0
    • G GerVenson

      Hey, A bit backstory: I am working for some time on my Text-Templating engine project Morestachio and all the time i compare the performance of Morestachio against other engines like cottle, handlebars.net, scribain etc and with the latest release of .Net5 i was thrilled as microsoft promised another out-of-the-box performance improvement like the one we saw when net.core came out where each version was measurably faster then the previous one. I read some block posts like this one: [Performance Improvements in .NET 5 | .NET Blog](https://devblogs.microsoft.com/dotnet/performance-improvements-in-net-5/) but when i did my usual performance comparisons I discovered more or less the opposite. I have two performance metrics: Historical performance tests including only Morestachio using Nunit and a project using the BenchmarkDotNet lib. BenchmarkDotNet: .net472:

      Method Mean Error StdDev Gen 0 Gen 1 Gen 2 Allocated
      Bench 2.019 ms 0.0041 ms 0.0036 ms 257.8125 15.6250 - 1.57 MB

      .NET5:

      Method Mean Error StdDev Gen 0 Gen 1 Gen 2 Allocated
      Bench 2.219 ms 0.0044 ms 0.0039 ms 85.9375 3.9063 - 705.5 KB

      .NetCore 3.1:

      Method Mean Error StdDev Gen 0 Gen 1 Gen 2 Allocated
      Bench 1.427 ms 0.0035 ms 0.0033 ms 95.7031 5.8594 - 783.67 KB

      this also performance difference is also present in the other test (i will not bother to post here). Yes Net5 is way more efficient in memory consumption but in comparison slower then even pre NetCore.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      If I put bigger or smaller wheels on a car, it will affect it's speed; all other things being equal. Memory and response time is like that. And we have different cars.

      It was only in wine that he laid down no limit for himself, but he did not allow himself to be confused by it. ― Confucian Analects: Rules of Confucius about his food

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups