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. Man i love C++

Man i love C++

Scheduled Pinned Locked Moved The Lounge
csharpc++androidcomtools
35 Posts 23 Posters 2 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.
  • L Lost User

    I hope you mean to say that some people need more than a lifetime to understand it and should look for an easier job, like in the fast food industry. :)

    F Offline
    F Offline
    Florin Jurcovici
    wrote on last edited by
    #20

    I think he meant what he said. Statistical evidence says you're twice as fast, on average, when using a language with managed memory. I think Joel Spolsky or Fowler, can't remember exactly who, said this about themselves too. It's my experience too. Also, the additional speed gained from super-optimized native code doesn't always make a difference. Plus, statistical analysis has shown that at least memory management is faster and requires less CPU cycles with managed memory than when doing all memory management manually (at the expense of a three to five times higher memory usage, on average - but I'd trade memory for CPU any time of the day, since fast CPUs are expensive whereas memory nowadays is cheap).

    L 1 Reply Last reply
    0
    • E Ennis Ray Lynch Jr

      Yes I just might marry it. Forgot how fast it was. In C# I was happy with 500 milliseconds, now I am down to 15 (this is btw, with a P/Invoke call in the middle). Since I am only performing about 500 milling double multiplications I should be able get it to go even faster.

      Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. I also do Android Programming as I find it a refreshing break from the MS. "And they, since they Were not the one dead, turned to their affairs" -- Robert Frost

      F Offline
      F Offline
      Florin Jurcovici
      wrote on last edited by
      #21

      It's more of an intense love/hate relation for me. C comes in handy when you absolutely need the speed, but don't have a huge model to implement. Java/C# come in handy when you need to develop and maintain code with minimal cost. When you need both - which is in itself a PITA - C++ is the only alternative. But it sort of adds to the PITA. Its only advantage is that there's not really anything else able to do the job.

      1 Reply Last reply
      0
      • J Joezer BH

        :confused:

        Tzumer

        F Offline
        F Offline
        Frans_55129
        wrote on last edited by
        #22

        Pascal, Python y Ada.

        1 Reply Last reply
        0
        • E Ennis Ray Lynch Jr

          Yes I just might marry it. Forgot how fast it was. In C# I was happy with 500 milliseconds, now I am down to 15 (this is btw, with a P/Invoke call in the middle). Since I am only performing about 500 milling double multiplications I should be able get it to go even faster.

          Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. I also do Android Programming as I find it a refreshing break from the MS. "And they, since they Were not the one dead, turned to their affairs" -- Robert Frost

          J Offline
          J Offline
          john morrison leon
          wrote on last edited by
          #23

          The only time I use a language other than C++ is when it gives access to a library which isn't available in C++, even then I often generate the code with C+++. C++ does everything I need and I am comfortable and fast with it. Why should I use another language?

          E 1 Reply Last reply
          0
          • P Pualee

            Are your time comparisons on the same machine? Or is your VC6 benchmark on a 10 year old computer? :-D

            A Offline
            A Offline
            Aswin Waiba
            wrote on last edited by
            #24

            :thumbsup::thumbsup::thumbsup:

            1 Reply Last reply
            0
            • E Ennis Ray Lynch Jr

              Yes I just might marry it. Forgot how fast it was. In C# I was happy with 500 milliseconds, now I am down to 15 (this is btw, with a P/Invoke call in the middle). Since I am only performing about 500 milling double multiplications I should be able get it to go even faster.

              Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. I also do Android Programming as I find it a refreshing break from the MS. "And they, since they Were not the one dead, turned to their affairs" -- Robert Frost

              C Offline
              C Offline
              ClockMeister
              wrote on last edited by
              #25

              Back when processors were slow I might have agreed but C# suits me fine now. -CB :-)

              1 Reply Last reply
              0
              • F Florin Jurcovici

                I think he meant what he said. Statistical evidence says you're twice as fast, on average, when using a language with managed memory. I think Joel Spolsky or Fowler, can't remember exactly who, said this about themselves too. It's my experience too. Also, the additional speed gained from super-optimized native code doesn't always make a difference. Plus, statistical analysis has shown that at least memory management is faster and requires less CPU cycles with managed memory than when doing all memory management manually (at the expense of a three to five times higher memory usage, on average - but I'd trade memory for CPU any time of the day, since fast CPUs are expensive whereas memory nowadays is cheap).

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

                Florin Jurcovici wrote:

                Statistical evidence says you're twice as fast, on average, when using a language with managed memory. I think Joel Spolsky or Fowler, can't remember exactly who, said this about themselves too. It's my experience too.

                Never believe statistics you have not forged yourself. In this case I would say, that the powerful framework assists you better than the C++ standard libraries. I heard the same from C Win32 C programmers about Win32 assembly programmers. They both used the same API and structured their code in the same way, and the only difference was the language. Comparing C++ with Java or C# and assuming strict object orientation, I don't see much of a difference. On one side I put some thought into the destructors, on the other side I put the same thought into what I do with the finalizer and IDisposable. The code even looks the same, except that I write 'delete Someobject;' instead of 'SomeObject.Dispose();'. And more advanced patterns for managing objects' lifecycles are also not inherently more complicated on either side. The only difference is, that I can't simply let an object go out of scope without deleting it. It's not an optional good practice, it's a must here. To prevent this, I use a simple debugging assertion that reports any remaining objects on the heap when the program terminates and that usually is enough to lead me to the location of the memory leak.

                Florin Jurcovici wrote:

                Also, the additional speed gained from super-optimized native code doesn't always make a difference.

                "But beware of the dark side. Ignorance, lazyness, hastyness; the dark side of the Force are they. Easily they flow, quick to join you in a project. If once you start down the dark path, forever will it dominate your destiny, consume you it will, as it did the Java programmers." Seriously, that kind of argument usually comes from people who could not optimize their code if their lives depended on it. You can take a look at the 'weird and wonderful' forum here to see what kind of things people do when they don't know what they are doing and prefer to leave the dirty work to dumb mechanisms like compilers for code optimization or garbage collection for memory management. Do your statistics also mention the amount of time it takes to clean up the mess such people can produce? Or have you ever seen an entire team of Java programmers struggle with a memory leak for m

                1 Reply Last reply
                0
                • E Ennis Ray Lynch Jr

                  Yes I just might marry it. Forgot how fast it was. In C# I was happy with 500 milliseconds, now I am down to 15 (this is btw, with a P/Invoke call in the middle). Since I am only performing about 500 milling double multiplications I should be able get it to go even faster.

                  Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. I also do Android Programming as I find it a refreshing break from the MS. "And they, since they Were not the one dead, turned to their affairs" -- Robert Frost

                  F Offline
                  F Offline
                  Fabio Franco
                  wrote on last edited by
                  #27

                  Have you tried doing your heavy calculations in C# unsafe context?

                  To alcohol! The cause of, and solution to, all of life's problems - Homer Simpson ---- Our heads are round so our thoughts can change direction - Francis Picabia

                  1 Reply Last reply
                  0
                  • K Kevin Marois

                    Life is too short to code in C++

                    If it's not broken, fix it until it is

                    S Offline
                    S Offline
                    SeattleC
                    wrote on last edited by
                    #28

                    Life is too short to await results from Java. If you're not running flat-out 24/7, it's almost not worth coding.

                    1 Reply Last reply
                    0
                    • C Colin Mullikin

                      Would you say you like your programming languages the same way you like your women...? Fast and unsafe... :laugh:

                      The United States invariably does the right thing, after having exhausted every other alternative. -Winston Churchill America is the only country that went from barbarism to decadence without civilization in between. -Oscar Wilde Wow, even the French showed a little more spine than that before they got their sh*t pushed in.[^] -Colin Mullikin

                      J Offline
                      J Offline
                      JJM06
                      wrote on last edited by
                      #29

                      Colin Mullikin wrote:

                      Would you say you like your programming languages the same way you like your women...?
                       
                      Fast and unsafe... :laugh:

                      ... and loosely typed? :laugh:

                      E 1 Reply Last reply
                      0
                      • R RugbyLeague

                        I recently rewrote my Compiler/Runtime in C# - it was previously in VC6 - I had expected to take a performance hit but the C# version is faster - sometimes much faster. Which surprised me. I suppose I have much better profiling tools these days than were available 12 years ago so I was able to identify some bottlenecks but nothing I would have thought to make such a difference.

                        M Offline
                        M Offline
                        Member 4608898
                        wrote on last edited by
                        #30

                        That is probably because VC6 does not take advantage of multiprocessor architecture. If you compared a VC6 program with a VC8/VC9 program, you'd see the difference. If you compared that with the C# version, you might see a difference

                        R 1 Reply Last reply
                        0
                        • M Member 4608898

                          That is probably because VC6 does not take advantage of multiprocessor architecture. If you compared a VC6 program with a VC8/VC9 program, you'd see the difference. If you compared that with the C# version, you might see a difference

                          R Offline
                          R Offline
                          RugbyLeague
                          wrote on last edited by
                          #31

                          The compiler I have written doesn't cater for a mutliprocessor architecture - it's all one thread.

                          1 Reply Last reply
                          0
                          • L Lost User

                            I hope you mean to say that some people need more than a lifetime to understand it and should look for an easier job, like in the fast food industry. :)

                            E Offline
                            E Offline
                            etkid84
                            wrote on last edited by
                            #32

                            :thumbsup:

                            David

                            1 Reply Last reply
                            0
                            • A Albert Holguin

                              You know... if I had a dime for every time a Java app has crashed my phone... it would have paid for itself by now...

                              E Offline
                              E Offline
                              etkid84
                              wrote on last edited by
                              #33

                              :laugh: :thumbsup:

                              David

                              1 Reply Last reply
                              0
                              • J JJM06

                                Colin Mullikin wrote:

                                Would you say you like your programming languages the same way you like your women...?
                                 
                                Fast and unsafe... :laugh:

                                ... and loosely typed? :laugh:

                                E Offline
                                E Offline
                                etkid84
                                wrote on last edited by
                                #34

                                :thumbsup:

                                David

                                1 Reply Last reply
                                0
                                • J john morrison leon

                                  The only time I use a language other than C++ is when it gives access to a library which isn't available in C++, even then I often generate the code with C+++. C++ does everything I need and I am comfortable and fast with it. Why should I use another language?

                                  E Offline
                                  E Offline
                                  etkid84
                                  wrote on last edited by
                                  #35

                                  :cool:

                                  David

                                  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