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 7 slower than .NET 6?

.NET 7 slower than .NET 6?

Scheduled Pinned Locked Moved .NET (Core and Framework)
csharpdotnettutorialquestion
5 Posts 3 Posters 32 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.
  • K Offline
    K Offline
    Kevin McFarlane
    wrote on last edited by
    #1

    Has anyone found that? Just tried upgrading a hand-rolled ML console application from .NET 6 to .NET 7 and found it was slower. In my example it went from 0.55s to 0.7s. Tried this several times in each case. Previously, the time had almost halved in going from .NET 4.8 to 6.0. I'm not using any packages. :confused:

    Kevin

    L Richard DeemingR 2 Replies Last reply
    0
    • K Kevin McFarlane

      Has anyone found that? Just tried upgrading a hand-rolled ML console application from .NET 6 to .NET 7 and found it was slower. In my example it went from 0.55s to 0.7s. Tried this several times in each case. Previously, the time had almost halved in going from .NET 4.8 to 6.0. I'm not using any packages. :confused:

      Kevin

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

      If you want to learn more, add stopwatches to see which "parts" are slower. Startup? Shutdown? Something else? What's the footprint? Debug versus release?

      "Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I

      K 1 Reply Last reply
      0
      • K Kevin McFarlane

        Has anyone found that? Just tried upgrading a hand-rolled ML console application from .NET 6 to .NET 7 and found it was slower. In my example it went from 0.55s to 0.7s. Tried this several times in each case. Previously, the time had almost halved in going from .NET 4.8 to 6.0. I'm not using any packages. :confused:

        Kevin

        Richard DeemingR Offline
        Richard DeemingR Offline
        Richard Deeming
        wrote on last edited by
        #3

        It shouldn't be slower. I'd suggest reporting the problem on the .NET GitHub repo[^], along with the simplest reproduction of the problem you can get, and the relevant benchmarks from .NET 6 and 7.


        "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

        "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

        K 1 Reply Last reply
        0
        • L Lost User

          If you want to learn more, add stopwatches to see which "parts" are slower. Startup? Shutdown? Something else? What's the footprint? Debug versus release?

          "Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I

          K Offline
          K Offline
          Kevin McFarlane
          wrote on last edited by
          #4

          Gerry Schmitz wrote:

          What's the footprint? Debug versus release?

          Release vs Release vs Release. No code changes apart from using top-level statements when I went from .NET 4.8 to .NET 6. This is just a sample from a book. Not important, but just curious as it defied my expectations.

          Kevin

          1 Reply Last reply
          0
          • Richard DeemingR Richard Deeming

            It shouldn't be slower. I'd suggest reporting the problem on the .NET GitHub repo[^], along with the simplest reproduction of the problem you can get, and the relevant benchmarks from .NET 6 and 7.


            "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

            K Offline
            K Offline
            Kevin McFarlane
            wrote on last edited by
            #5

            Reported issue. They suggested running from console with DOTNET_TC_QuickJitForLoops=0 env var defined. That speeds it up slightly, although 6.0 is still a bit faster. I read somewhere that in 6.0, setting that to 0 speeds things up but that in .NET 7 there's no difference. Though to me it looks like it might be the other way round! So for 6.0 I get 0.53/0.54s (two successive runs). For 7.0 it is 0.57/0.58s. Still, nothing worth bothering about.

            Kevin

            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