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.
  • R Richard A Dalton

    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 Offline
    P Offline
    PIEBALDconsult
    wrote on last edited by
    #31

    "See post-increment" is five syllables, not three.

    1 Reply Last reply
    0
    • F federico strati

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

      D Offline
      D Offline
      Dwayne J Baldwin
      wrote on last edited by
      #32

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

      Dwayne J. Baldwin

      M 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
        Member 96
        wrote on last edited by
        #33

        1998 called, it wants it's argument back. :)


        “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
        • R Richard A Dalton

          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

          A Offline
          A Offline
          Adriaan Davel
          wrote on last edited by
          #34

          Please come wipe the coffee off my screen, and keep reminding me to clear my coffee before reading any other of your posts

          ____________________________________________________________ Be brave little warrior, be VERY brave

          1 Reply Last reply
          0
          • N Nagy Vilmos

            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

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

            Nagy Vilmos wrote:

            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.

            This statement alone might be enough for me to hire you if I was hiring!

            Nagy Vilmos wrote:

            Depending on what is being done, different tools are chosen for different jobs.

            But this statement would seal the deal! Congratulations on being a voice of reason. I wish there was a badge we could award people here for that kind of thing. :-D


            “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
            • K Kevin McFarlane

              federico.strati wrote:

              Anyway, managed code is inherently slower than unmanaged. You got other benefits, like platform indipendence and so on...

              Look, these kinds of statement are almost meaningless. The overarching strategy is to consider the nature of your business problem and then choose the appropriate tool(s) for the problem(s) at hand. Raw execution speed is just one criterion. Also factors such as ease of design and expressiveness can enable performance improvements over closer-to-the-metal languages. I remember being told at one interview that a port of their app. from C++ to C# increased app. performance. I also know of a case study with Eiffel (a "managed" language) where a port from C to Eiffel resulted in way greater performance due to ease of design and expressiveness.

              Kevin

              A Offline
              A Offline
              Adriaan Davel
              wrote on last edited by
              #36

              Yep, sometimes guys (and gals) get soo deep into optimizing a loop that they don't realize that the routine is redundant. If using a managed language helps you do a more optimal design (you won't get lost in technicality rabbit holes) your app is bound to perform better, I speak from experience. Often shaving off milliseconds in a loop makes no difference to a user, avoiding an unnecessary routine does... I'm not saying unmanaged code will cause this btw, I'm just more like to make good decisions while using a managed language (with intellisense :))

              ____________________________________________________________ Be brave little warrior, be VERY brave

              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.

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

                Wow, this sounds interesting. I'm forced to update a major project to .net4 soon and at least this gives me something to look forward to. I don't look forward to rewriting my convoluted inno setup scripts to detect if .net4 is present and automatically take the user to whatever fresh hell microsoft implemented to download and install it though.


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

                  S Offline
                  S Offline
                  SLDWorks
                  wrote on last edited by
                  #38

                  You can fit C Sharp in most holes. But C++ is a picket fence you don’t have to walk around. Mind you getting on your hands and knees to crawl through the fence is a lot grunt work for the result. So when the need is to be quick, and gain huge results fast. The preference would be to whittle your way through the hole, with something sharp. If you don’t understand what I’m talking about, or coming from. Take a look at Visual Basic. It’s still pointy.

                  Dont turn around, cause your...

                  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.

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