Man i love C++
-
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
Life is too short to code in C++
If it's not broken, fix it until it is
-
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
Interesting usually I have found that once code is JITed repeated code takes almost the same time in managed/native. Obviously it all depends!
-
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
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
-
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
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...
-
Life is too short to code in C++
If it's not broken, fix it until it is
-
Native. I am only testing a "small" subset of data right now. IRL, I should several order of magnitudes more data and it still needs to be real-time-ish. 500ms in C# was too slow so I am trying C++ with all optimizations on, after I get this down the next step is moving it to CUDA (if installed) Surprisingly the code is really simple just a lot of multiplication.
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
Play around with Auto-Parallelization and Auto-Vectorization[^] I've been able to get some amazing results, with little effort.
Espen Harlinn Principal Architect, Software - Goodtech Projects & Services AS Projects promoting programming in "natural language" are intrinsically doomed to fail. Edsger W.Dijkstra
-
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. :)
@@@@@@@@@@@@@@@@@@@@@#+'''''+#@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@+;;;;;;;;;;;;;;'#@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@#';;;;;;;;;;;;;;;;;;;+@@@@@@@@@@@@@@
@@@@@@@@@@@@@';;;;;;;;;;;;;;;;;;;;;;;+@@@@@@@@@@@@
@@@@@@@@@@@';;;;;;;;:::::,,,:;;;;;;;;;;#@@@@@@@@@@
@@@@@@@@@@;;;;;;;;::::::::,,,;;;;;;;;;;;+@@@@@@@@@
@@@@@@@@#;;;;;;;:::::::::::,,;;;;;;;;;;;;'@@@@@@@@
@@@@@@@#;;;;;;::::::::::::::;;;;;;;;;;;;;;'@@@@@@@
@@@@@@#;;;;;;;:::::::;;;;;;;;;;;;;;;;;;;;;;'@@@@@@
@@@@@@;;;;;;;;;:::;;;;;;;;;;::,,,,....;;;;;;'@@@@@
@@@@@;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;#@@@@
@@@@+;;;;;;;;;;;;;;;;;;;;;;;, `;;;;;;;@@@@
@@@@;;;;;;;;;;;;;;;;;;;;;;;;; ``;;;;;;;'@@@
@@@';;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;#@@
@@@;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;; ,;'@@
@@';;;;;;;;;;;;;;;;;;;;;;;;;;, ,;;;;;;;;. ,;;@@
@@;;;;;;;;;;;;;` ;;;;;;;;;;;;; `;;;;; .;;'@
@+;;;;;;;;;;;;; ;;;;;;; ;; ,;;; .;;;@
@;;;;;;;;;;;;;; ,;. `; ;` .;;` .;''@
@;;;;;;;,,;;;;; ; :: ;;` ., ,;;, ;;; `;''+
@;;;;;; `;;;;;, ; ;. :.` ;;;;;;;, ;; `''''
#;;;;` .;` ;; : ;, ;;;;;;;; ;;;'''''
+;;, `;, ; ;; .:;;;;;;;;;;;` ;; ;'''
'; ;; ,, , ; ;;; ;;;;;;;; ;: `'''
'; ` ,; ;;. `, ; `; ;;;;;;;; '' :'''
'; ;; `;;: ; ;, `; .;; :;;. ''''''''
';;;; ;; ;: ; .;` .;;;;;;;; .''''''''
+;;;; ; :;` : .;;;;;;;;;;;;. '''''''''
+;;;; ; `. .;;;;;;;;;;;;;;;; ;'''''''''
#;;;;. : `:;;;;;;;;;;;;;;;;;; .'''''''''''
@;;;;: .; `;;;;;;;;;;;;;;;;;;;;;;''''''''''''''+
@;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;'''''''''''''''#
@';;;; `;;;;;;;;;;;;;;;;;;;;;;;;''''''''''''''''@
@@;;;; :;;;;;;;;;;;;;;;;;;;;;;;;'''''''''''''''''@
@@;;;;;;;;;;;;;;;;;;;;;;;;;;;;;'''''''''''''''''#@
@@+;;;;;;;;;;;;;;;;;;;;;;;;;;;''''''''''''''''''@@
@@@;;;;;;;;;;;;;;;;;;;;;;;;;;''''''''''';''''''+@@
@@@+;;;;;;;;;;;;;;;;;;;;;;;;''''''''''';;''''''@@@
@@@@;;;;;;;;;;;;;;;;;;;;;;;''''''''''';;;'''''#@@@
@@@@@;;;;;;;;;;;;;;;;;;;;;''''''''''';;;;''''+@@@@
@@@@@+;;;;;;;;;;;;;;;;;;;'''''''''';;;;;;''''@@@@@
@@@@@@';;;;;;;;;;;;;;;;;''''''''':::;;;;''''@@@@@@
@@@@@@@';;;;;;;;;;:::;;;''''';:.,,::;;;''''@@@@@@@
@@@@@@@@';;;;;;;;;:::,,.` ``.,,::;;''''@@@@@@@@
@@@@@@@@@+;;;;;;;;:::,,.` ``.,,::'''''@@@@@@@@@
@@@@@@@@@@#;;;;;;;:::,,.` ``.,,;''''+@@@@@@@@@@
@@@@@@@@@@@@';;;;;;;:,,.` `.:''''''#@@@@@@@@@@@
@@@@@@@@@@@@@@';;;''''''''''''''''''#@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@'''''''''' -
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
Kind of unfair comparison, I must say, since P/Invoke has its own overhead. One way to reduce the number of P/Invoke calls, is to batch all the native operations in a C++/CLI method (to lessen the cost of managed-to-native transition).
-
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
-
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. :)
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).
-
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
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.
-
Pascal, Python y Ada.
-
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
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?
-
Are your time comparisons on the same machine? Or is your VC6 benchmark on a 10 year old computer? :-D
:thumbsup::thumbsup::thumbsup:
-
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
Back when processors were slow I might have agreed but C# suits me fine now. -CB :-)
-
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).
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
-
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
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
-
Life is too short to code in C++
If it's not broken, fix it until it is
-
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
-
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.
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