Man i love C++
-
Is this managed code or native?
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997Native. 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
-
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 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.
-
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.
-
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
-
Are your time comparisons on the same machine? Or is your VC6 benchmark on a 10 year old computer? :-D
That's what my boss asked me too. I gave her a withering glare (she is my wife so is used to such glares)
-
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 am refactoring a C++ collection class I wrote some time back for embedded systems and am really enjoying working with it again. Of course in my case I'm not as concerned with speed as I am with space.
VS2010/Atmel Studio 6.0 ToDo Manager Extension
Version 3.0 now available. There is no place like 127.0.0.1 -
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 in the late 80's/early 90's, I was working in Turbo Pascal on an estate planning application which was performing hundreds of thousands of tax calculations 10's of thousands of times. To say it was slow would be overly kind to the original programmer. I rewrote the code to only need about 20 calculations thousands of times. Generating the resulting charts went from taking about 30 seconds to less than two. When we moved to C++, it was reduced to less than one.
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997 -
I enabled those as a compiler option but other than that I haven't done anything with them (that made a big difference though). Really, I just want a way to justify doing cuda programming : )
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
-
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.