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.
  • 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.

    M Offline
    M Offline
    Member 96
    wrote on last edited by
    #39

    federico.strati wrote:

    it is the beginning of a flame war...

    Nope, it's a flare up in a very, very, verrrrrrryyyy old flame ware that should have died many years ago. The "pick the right tool for the job" side wins these type of flame wars every time anyway, there's no point in fighting really. :)


    “If you want to build a ship, don't drum up people together to collect wood and don't assign them tasks and work, but rather teach them to long for the endless immensity of the sea” - Antoine de Saint-Exupery

    1 Reply Last reply
    0
    • F federico strati

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

      M Offline
      M Offline
      Michael Kingsford Gray
      wrote on last edited by
      #40

      And pure machine code is faster than C++. What is your point, exactly?

      1 Reply Last reply
      0
      • D Dwayne J Baldwin

        Compared to actual development time, C++ is an order of magnitude less productive than vb.net.

        Dwayne J. Baldwin

        M Offline
        M Offline
        Michael Kingsford Gray
        wrote on last edited by
        #41

        ... and a lot more fragile & expensive. Look at the number of C & C++ 'overflow' problems that have been exploited by hackers. They have probably cost industry billions of $. I have yet to see a pure overflow bug in .Net4.

        1 Reply Last reply
        0
        • F federico strati

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

          7 Offline
          7 Offline
          77465
          wrote on last edited by
          #42

          Long ago I did a synthetic test too. C# was the fastest beating C++ 15%. I remembered C# is fast and lost any interest in tests since their results are random or task specific, whatever term you prefer. C# can be slower than C++ mainly due to compressing garbage collector and faster since JIT compilation is done for the specific system allowing for better optimization. Compressing garbage collector may allow a C# program to work where a C++ program runs out of memory. C++ does not have any raw speed advantage over C#. With C# it is possible to run compiled code when doing ad-hoc tasks, the way regular expressions and later LINQ do. This alone makes C# much faster for non-trivial cases. P.S. "faster than any runtime"? It is possible to guess what the idea was, but since C++ also has a runtime...

          1 Reply Last reply
          0
          • F federico strati

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

            F Offline
            F Offline
            Fatbuddha 1
            wrote on last edited by
            #43

            So my experience is that C++ rocks compared to Java if the program has just seconds of execution time. (See also the test that you posted) However, Java overtakes the lead after a half minute of execution time. I think this is because of optimization of the JVM. I have to say I have no idea about C# since I am only working on Unix systems. Cheers

            You have the thought that modern physics just relay on assumptions, that somehow depends on a smile of a cat, which isn’t there.( Albert Einstein)

            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
              Fadi Alsamman
              wrote on last edited by
              #44

              By comparing C#(4.0) performance to C++ performance people, your are giving C# one extra big point.because among all other features C# can give me this is the last issue wich make me consider my decision moving to C#.

              1 Reply Last reply
              0
              • K Kevin McFarlane

                Chris Losinger wrote:

                not if you want the job done correctly.

                I've worked in both C++ and .NET and I've not seen any greater dev ability in C++ compared to C#. I agree that C++ done well is fine but my experience was that most actual C++ was a mishmash of sloppy low-level C techniques combined with occasional high-level abstractions. Given that reality I much prefer being in the .NET environment.

                Chris Losinger wrote:

                you can avoid things like LINQ and anonymous delegates and nullable variables

                Actually, these features enable more concise and more expressive code.

                Kevin

                L Offline
                L Offline
                LimitedAtonement
                wrote on last edited by
                #45

                Kevin McFarlane wrote:

                I've worked in both C++ and .NET and I've not seen any greater dev ability in C++ compared to C#.

                I don't think he was saying that C++ code devs write better code, but good code costs more than bad code. The original statement was

                Nagy Vilmos

                2. Developers are cheaper for modern managed languages over older unmanaged platforms.

                Which Chris Losigner is saying is incorrect. Chris says, as I understand it, "If you want the job done right, you won't pay less." If it's the case that developers are cheaper for modern managed languages, it may be because there are lots of worse developers in the modern languages, whereas C++ has a natural weed-out procedure, namely, learning templates, not using intellisense, understanding indirection, learning about memory management enough to use those smart pointer classes, etc. Any little monkey can write a program in C# or VB, but it takes a good programmer to write a good multi-threaded C# server, equally good as it would take to write a C++ one, even though perhaps the C# one would run 10% slower, and would take 60% the development time. Right, anyway, just defending Chris who I don't think was saying anything about C++ dev superiority.

                In Christ, Aaron Laws http://ProCure.com

                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.

                  E Offline
                  E Offline
                  Ed K
                  wrote on last edited by
                  #46

                  .net 4 looks really good! Now if they could just fix VS2010 I might be inclined to work with it!

                  ed ~"Watch your thoughts; they become your words. Watch your words they become your actions. Watch your actions; they become your habits. Watch your habits; they become your character. Watch your character; it becomes your destiny." -Frank Outlaw.

                  S 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.

                    J Offline
                    J Offline
                    JasonPSage
                    wrote on last edited by
                    #47

                    With FreePascal - you get the binary executable.. write once , and compile on any platform. Unlike Java... you get both C++ speed and portability. --Jason

                    Know way too many languages... master of none!

                    1 Reply Last reply
                    0
                    • S Super Lloyd

                      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.

                      P Offline
                      P Offline
                      programmervb netc
                      wrote on last edited by
                      #48

                      C++ is usually faster than .NET but it is going to take you so long to deliver the product the customer is going to be waiting on you longer than they are waiting on the program to execute if written in .NET.... That being said I am a .NET guy and I have only written C++ in school however there is some reason almost all big games are written in C++. Besides if you want to deliver really fast just use VB.NET unless you need those 4 or 5 extra features that C# has. Humble Programmer

                      J 1 Reply Last reply
                      0
                      • E Ed K

                        .net 4 looks really good! Now if they could just fix VS2010 I might be inclined to work with it!

                        ed ~"Watch your thoughts; they become your words. Watch your words they become your actions. Watch your actions; they become your habits. Watch your habits; they become your character. Watch your character; it becomes your destiny." -Frank Outlaw.

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

                        Err... what's wrong with VS2010?!?

                        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.

                        E 1 Reply Last reply
                        0
                        • S Super Lloyd

                          Err... what's wrong with VS2010?!?

                          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.

                          E Offline
                          E Offline
                          Ed K
                          wrote on last edited by
                          #50

                          Several things... No.. Lots of things!! There have been many posts here and I don't have the energy to go thru the list!! And I have to get my son ready to play football. Maybe my experience was the oddball but not from what I've seen here in the forum. I've never had issues with any version of VS so I was really surprised and very disappointed.

                          ed ~"Watch your thoughts; they become your words. Watch your words they become your actions. Watch your actions; they become your habits. Watch your habits; they become your character. Watch your character; it becomes your destiny." -Frank Outlaw.

                          1 Reply Last reply
                          0
                          • P programmervb netc

                            C++ is usually faster than .NET but it is going to take you so long to deliver the product the customer is going to be waiting on you longer than they are waiting on the program to execute if written in .NET.... That being said I am a .NET guy and I have only written C++ in school however there is some reason almost all big games are written in C++. Besides if you want to deliver really fast just use VB.NET unless you need those 4 or 5 extra features that C# has. Humble Programmer

                            J Offline
                            J Offline
                            JaredThirsk
                            wrote on last edited by
                            #51

                            "Besides if you want to deliver really fast just use VB.NET unless you need those 4 or 5 extra features that C# has." Are you saying it is faster to write code in VB.NET than in C#?

                            P 1 Reply Last reply
                            0
                            • J JaredThirsk

                              "Besides if you want to deliver really fast just use VB.NET unless you need those 4 or 5 extra features that C# has." Are you saying it is faster to write code in VB.NET than in C#?

                              P Offline
                              P Offline
                              programmervb netc
                              wrote on last edited by
                              #52

                              It was really meant as a joke but in my personal experience there is alot more "sugar" in VB.NET that makes things easier to do than in C#. The same things are happening behind the scenes it is just less coding in VB.NET the code in C# makes you write the stuff behind the scenes. Humble Programmer

                              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