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. The Lounge
  3. .NET 4 Rocks!

.NET 4 Rocks!

Scheduled Pinned Locked Moved The Lounge
csharpcssperformancelounge
52 Posts 26 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.
  • S Offline
    S Offline
    Super Lloyd
    wrote on last edited by
    #1

    .NET4 rocks! I had this impression but now I'm just upgrading an old performance intensive demo from .NET 1 => .NET 2 => .NET 3 => .NET 4 => .NET4 + Parrallel it takes 40% time less when I change the runtime from 3 to 4!!! Yoohoo! Now trying parallel extension.. it's more tricky, sometimes it's slow things down!!! Investigating....

    A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station.... _________________________________________________________ My programs never have bugs, they just develop random features.

    P F M F E 5 Replies Last reply
    0
    • S Super Lloyd

      .NET4 rocks! I had this impression but now I'm just upgrading an old performance intensive demo from .NET 1 => .NET 2 => .NET 3 => .NET 4 => .NET4 + Parrallel it takes 40% time less when I change the runtime from 3 to 4!!! Yoohoo! Now trying parallel extension.. it's more tricky, sometimes it's slow things down!!! Investigating....

      A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station.... _________________________________________________________ My programs never have bugs, they just develop random features.

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      We found some of the issues when one loop is waiting on the processing from another loop. It seems to slow things right down. Apart from that, .NET 4 is a vastly improved product - partly, I suspect, down to the pared down runtime.

      I have CDO, it's OCD with the letters in the right order; just as they ruddy well should be

      Forgive your enemies - it messes with their heads

      My blog | My articles | MoXAML PowerToys | Onyx

      1 Reply Last reply
      0
      • S Super Lloyd

        .NET4 rocks! I had this impression but now I'm just upgrading an old performance intensive demo from .NET 1 => .NET 2 => .NET 3 => .NET 4 => .NET4 + Parrallel it takes 40% time less when I change the runtime from 3 to 4!!! Yoohoo! Now trying parallel extension.. it's more tricky, sometimes it's slow things down!!! Investigating....

        A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station.... _________________________________________________________ My programs never have bugs, they just develop random features.

        F Offline
        F Offline
        federico strati
        wrote on last edited by
        #3

        never underestimate the powers of pure C++ ... in general 40 to 50 % faster than any runtime.

        P S R S T 13 Replies Last reply
        0
        • F federico strati

          never underestimate the powers of pure C++ ... in general 40 to 50 % faster than any runtime.

          P Offline
          P Offline
          Pete OHanlon
          wrote on last edited by
          #4

          You make a statement like that, you've got to be able to prove it. Go on, back it up.

          I have CDO, it's OCD with the letters in the right order; just as they ruddy well should be

          Forgive your enemies - it messes with their heads

          My blog | My articles | MoXAML PowerToys | Onyx

          H R 2 Replies Last reply
          0
          • F federico strati

            never underestimate the powers of pure C++ ... in general 40 to 50 % faster than any runtime.

            S Offline
            S Offline
            Super Lloyd
            wrote on last edited by
            #5

            yes, I was often told! but it doesn't appeal to me much... I also thought of having just a small module with just the algorithm in C++, but the deployment problem haunt me! (you know, I need a 32bit, 64bit version, no version for Silverlight, multiple installer, etc...) + plus if I plug external C# function in the middle of it, I suspect it will slow thing down, interop tend to do that! :(

            A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station.... _________________________________________________________ My programs never have bugs, they just develop random features.

            1 Reply Last reply
            0
            • F federico strati

              never underestimate the powers of pure C++ ... in general 40 to 50 % faster than any runtime.

              R Offline
              R Offline
              Richard A Dalton
              wrote on last edited by
              #6

              federico.strati wrote:

              never underestimate the powers of pure C++ ... in general 40 to 50 % faster than any runtime.

              At two syllables rather than three, C# is 33% faster than C++ just in terms of saying the name. That's got to count for something? Right? -Rd

              P A 2 Replies Last reply
              0
              • F federico strati

                never underestimate the powers of pure C++ ... in general 40 to 50 % faster than any runtime.

                S Offline
                S Offline
                Simon P Stevens
                wrote on last edited by
                #7

                I agree with Mr O'Hanlon; Lets see a code samples. ;)

                Simon

                F 1 Reply Last reply
                0
                • S Simon P Stevens

                  I agree with Mr O'Hanlon; Lets see a code samples. ;)

                  Simon

                  F Offline
                  F Offline
                  federico strati
                  wrote on last edited by
                  #8

                  Exactly what I thought... it is the beginning of a flame war... Anyway, managed code is inherently slower than unmanaged. You got other benefits, like platform indipendence and so on... Too tired to present an example, but I suspect serialisation would be an excellent candidate.

                  P H K M J 5 Replies Last reply
                  0
                  • F federico strati

                    never underestimate the powers of pure C++ ... in general 40 to 50 % faster than any runtime.

                    T Offline
                    T Offline
                    Tsuda Kageyu
                    wrote on last edited by
                    #9

                    You're right as long as MFC stays away from us.

                    1 Reply Last reply
                    0
                    • P Pete OHanlon

                      You make a statement like that, you've got to be able to prove it. Go on, back it up.

                      I have CDO, it's OCD with the letters in the right order; just as they ruddy well should be

                      Forgive your enemies - it messes with their heads

                      My blog | My articles | MoXAML PowerToys | Onyx

                      H Offline
                      H Offline
                      hairy_hats
                      wrote on last edited by
                      #10

                      Will this[^] do? C# on Windows .NET versus GNU C++ on Linux seems to give the biggest difference.

                      P S S 4 Replies Last reply
                      0
                      • F federico strati

                        never underestimate the powers of pure C++ ... in general 40 to 50 % faster than any runtime.

                        N Offline
                        N Offline
                        Nagy Vilmos
                        wrote on last edited by
                        #11

                        In a lot of usages, pure speed is not the only deciding factor. Assuming your ascertation is more than simple hypothesis, let us consider for one moment the advantages of ‘slower’ managed code. 0. Memory is, on the whole, MANAGED for you. Thus the reliance on the coder getting it right is removed. BIG bonus time. 1. Development time is, I am sorry to say, quicker using C# [for example] than C++ 2. Developers are cheaper for modern managed languages over older unmanaged platforms. So, from these simple three points you can see why managed not-det environment is preferred. The customer – that’s the guy paying for the work – get’s more bangs for their buck and doesn’t notice that the response is 200ms against 120ms. To clarify my position, we use TCL scripting, C#, C++ and Java all in one huge big mofu application. Depending on what is being done, different tools are chosen for different jobs. For desktop UI, C# rocks. For processing 10 kt/m C++ is great. For site modifiable interactions and configuration TCL is the Daddy. To keep the Hippies happy Java is the way man.


                        Panic, Chaos, Destruction. My work here is done. or "Drink. Get drunk. Fall over." - P O'H

                        C M 2 Replies Last reply
                        0
                        • F federico strati

                          never underestimate the powers of pure C++ ... in general 40 to 50 % faster than any runtime.

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

                          Granted, 'managed' means some additional overhead which good old C or C++ avoid. But 40 - 50 %? First you must take a look at your program and identify the parts where the CPU is really put to work. And already 90% or more of your code have become totally uninteresting. After identifying the critical parts of your program, you need to take a good look at your algorithms at those locations. A poorly chosen algorithm can kill the performance, totally independent of the programming language, the optimizations the compiler may perform or the capabilities of the actual hardware. In C++ it has become unusual to optimize the code for a certain hardware. Nowadays there are just too many different CPUs, so you can't really know what awaits your program at runtime. Managed applications may actually have an advantage here since they are compiled just before execution. So where is this guaranteed performance boost in C++ supposed to come from? P.S: I still like working in C++ and also have done a bit of optimizing there, but I simply don't see that vast advantage in performance. You have to work hard to get it and with similar treatment a managed language may produce similar results.

                          A while ago he asked me what he should have printed on my business cards. I said 'Wizard'. I read books which nobody else understand. Then I do something which nobody understands. After that the computer does something which nobody understands. When asked, I say things about the results which nobody understand. But everybody expects miracles from me on a regular basis. Looks to me like the classical definition of a wizard.

                          1 Reply Last reply
                          0
                          • F federico strati

                            never underestimate the powers of pure C++ ... in general 40 to 50 % faster than any runtime.

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

                            federico.strati wrote:

                            never underestimate the powers of pure C++ ... in general 40 to 50 % faster than any runtime.

                            Yep. Add in a decent compiler and a decent OS and there is no contest at all.

                            1 Reply Last reply
                            0
                            • H hairy_hats

                              Will this[^] do? C# on Windows .NET versus GNU C++ on Linux seems to give the biggest difference.

                              P Offline
                              P Offline
                              Pete OHanlon
                              wrote on last edited by
                              #14

                              Not really no - it goes part of the way, but I'd like to see it with .NET 4 which is much better performing than 3.5 due to the leaner client framework. Certainly, on Windows the difference between C# and Visual C++ is nowhere near the 40-50% difference claimed by the OP.

                              I have CDO, it's OCD with the letters in the right order; just as they ruddy well should be

                              Forgive your enemies - it messes with their heads

                              My blog | My articles | MoXAML PowerToys | Onyx

                              H 1 Reply Last reply
                              0
                              • H hairy_hats

                                Will this[^] do? C# on Windows .NET versus GNU C++ on Linux seems to give the biggest difference.

                                S Offline
                                S Offline
                                Simon P Stevens
                                wrote on last edited by
                                #15

                                Thanks, very interesting data. On Windows "C++ is %15.8 faster than .Net" On Linux "C++ is 22.% faster than Java" [Remember these are benchmarks over very specific high CPU usage problem sets. These are not general statements] Not quite the 40-50% originally said, but certainly interesting none the less. I'd be really interested to see the same tests repeated with .net 4.

                                Simon

                                1 Reply Last reply
                                0
                                • F federico strati

                                  Exactly what I thought... it is the beginning of a flame war... Anyway, managed code is inherently slower than unmanaged. You got other benefits, like platform indipendence and so on... Too tired to present an example, but I suspect serialisation would be an excellent candidate.

                                  P Offline
                                  P Offline
                                  Pete OHanlon
                                  wrote on last edited by
                                  #16

                                  federico.strati wrote:

                                  Exactly what I thought... it is the beginning of a flame war...

                                  No, it's not. You made an unsubstantiated comment - I'd be more inclined to listen if you actually backed it up rather than making a random statement and then run off when challenged to provide proof. Don't present anecdotal evidence - be empirical. I just get sick and tired of language zealots claiming that language A is better in than language B without offering any qualifying evidence.

                                  I have CDO, it's OCD with the letters in the right order; just as they ruddy well should be

                                  Forgive your enemies - it messes with their heads

                                  My blog | My articles | MoXAML PowerToys | Onyx

                                  N S 2 Replies Last reply
                                  0
                                  • H hairy_hats

                                    Will this[^] do? C# on Windows .NET versus GNU C++ on Linux seems to give the biggest difference.

                                    P Offline
                                    P Offline
                                    Pete OHanlon
                                    wrote on last edited by
                                    #17

                                    I'm more interested that it divides opinion, as the inbound link here[^] shows.

                                    I have CDO, it's OCD with the letters in the right order; just as they ruddy well should be

                                    Forgive your enemies - it messes with their heads

                                    My blog | My articles | MoXAML PowerToys | Onyx

                                    1 Reply Last reply
                                    0
                                    • H hairy_hats

                                      Will this[^] do? C# on Windows .NET versus GNU C++ on Linux seems to give the biggest difference.

                                      S Offline
                                      S Offline
                                      Super Lloyd
                                      wrote on last edited by
                                      #18

                                      The test should be done against .NET4, which is way faster than .NET3, whereas C++ is only a little bit faster than .NET3! ;)

                                      A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station.... _________________________________________________________ My programs never have bugs, they just develop random features.

                                      H P 2 Replies Last reply
                                      0
                                      • P Pete OHanlon

                                        federico.strati wrote:

                                        Exactly what I thought... it is the beginning of a flame war...

                                        No, it's not. You made an unsubstantiated comment - I'd be more inclined to listen if you actually backed it up rather than making a random statement and then run off when challenged to provide proof. Don't present anecdotal evidence - be empirical. I just get sick and tired of language zealots claiming that language A is better in than language B without offering any qualifying evidence.

                                        I have CDO, it's OCD with the letters in the right order; just as they ruddy well should be

                                        Forgive your enemies - it messes with their heads

                                        My blog | My articles | MoXAML PowerToys | Onyx

                                        N Offline
                                        N Offline
                                        Nagy Vilmos
                                        wrote on last edited by
                                        #19

                                        Pete O'Hanlon wrote:

                                        I just get sick and tired of language zealots claiming that 0 is better in than 1 without offering any qualifying evidence

                                        ftfy


                                        Panic, Chaos, Destruction. My work here is done. or "Drink. Get drunk. Fall over." - P O'H

                                        H 1 Reply Last reply
                                        0
                                        • P Pete OHanlon

                                          Not really no - it goes part of the way, but I'd like to see it with .NET 4 which is much better performing than 3.5 due to the leaner client framework. Certainly, on Windows the difference between C# and Visual C++ is nowhere near the 40-50% difference claimed by the OP.

                                          I have CDO, it's OCD with the letters in the right order; just as they ruddy well should be

                                          Forgive your enemies - it messes with their heads

                                          My blog | My articles | MoXAML PowerToys | Onyx

                                          H Offline
                                          H Offline
                                          hairy_hats
                                          wrote on last edited by
                                          #20

                                          It's interesting that Mono appears to be quicker than .NET - 3.5 at least.

                                          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