.NET 4 Rocks!
-
Pete O'Hanlon wrote:
I just get sick and tired of language zealots claiming that
0
is better in than1
without offering any qualifying evidenceftfy
Panic, Chaos, Destruction. My work here is done. or "Drink. Get drunk. Fall over." - P O'H
Exactly! 1 is much better than 0.
-
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.
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
-
Nagy Vilmos wrote:
0. Memory is, on the whole, MANAGED for you. Thus the reliance on the coder getting it right is removed. BIG bonus time.
there are enough smart ptr / container classes out there that no C++ programmer should have to worry about explicit memory management, if he/she doesn't want to.
Nagy Vilmos wrote:
1. Development time is, I am sorry to say, quicker using C# [for example] than C++
only because the .Net framework has so much built-in. as a language, C# isn't a great improvement. and with each new version it becomes more and more obtuse. and yes, you can avoid things like LINQ and anonymous delegates and nullable variables, but you can also avoid the ugly parts of C++.
Nagy Vilmos wrote:
2. Developers are cheaper for modern managed languages over older unmanaged platforms.
not if you want the job done correctly.
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
-
You make a statement like that, you've got to be able to prove it. Go on, back it up.
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
He's new, and obviously isn't aware that anything he says will need facts in order to establish an acceptable amount of veracity.
.45 ACP - because shooting twice is just silly
-----
"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
-----
"The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001 -
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
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#.
true; i don't think C++ development is necessarily better or faster. but i know i find myself wishing C# had some of C++'s features (and vice versa) whenever i switch from one to the other. the .Net framework is undeniably a wonderful toolbox, though. that's what makes C# seem more efficient, IMO. it's not that C#'s language constructs are all that great, it's that all the utility classes are right there.
Kevin McFarlane wrote:
Actually, these features enable more concise and more expressive code.
maybe, but they are ugly and cryptic - attributes C++ haters like to use against it.
-
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#.
true; i don't think C++ development is necessarily better or faster. but i know i find myself wishing C# had some of C++'s features (and vice versa) whenever i switch from one to the other. the .Net framework is undeniably a wonderful toolbox, though. that's what makes C# seem more efficient, IMO. it's not that C#'s language constructs are all that great, it's that all the utility classes are right there.
Kevin McFarlane wrote:
Actually, these features enable more concise and more expressive code.
maybe, but they are ugly and cryptic - attributes C++ haters like to use against it.
Chris Losinger wrote:
true; i don't think there's much difference. and i know i find myself wishing C# had some of C++'s features (and vice versa) whenever i switch from one to the other.
OK, so I don't think we're so far apart. :)
Chris Losinger wrote:
the .Net framework is undeniably a wonderful toolbox, though. that's what makes C# seem more efficient, IMO
True, but who cares? I just care that I'm more productive in the C# environment than I am in C++. There's also the IDE factor as well.
Chris Losinger wrote:
maybe, but they are ugly and cryptic
Strange. I don't think so. I think it's more the C++ ones that are ugly and cryptic. OTOH, I've not done any C++ for nearly five years so perhaps my views are coloured. Some of it is down to familiarity. F# looks cryptic to me. But for functional programming gurus C#, C++ etc. look ugly and verbose.
Kevin
-
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.
Are you saying that they should have tested it against a version of .NET which hadn't been released when they ran the tests?
-
Are you saying that they should have tested it against a version of .NET which hadn't been released when they ran the tests?
No, I mean they should update their post! ;P
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.
-
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
"See post-increment" is five syllables, not three.
-
never underestimate the powers of pure C++ ... in general 40 to 50 % faster than any runtime.
Compared to actual development time, C++ is an order of magnitude less productive than vb.net.
Dwayne J. Baldwin
-
never underestimate the powers of pure C++ ... in general 40 to 50 % faster than any runtime.
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
-
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
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
-
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
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
-
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
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
-
.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.
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
-
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
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...
-
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.
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
-
never underestimate the powers of pure C++ ... in general 40 to 50 % faster than any runtime.
And pure machine code is faster than C++. What is your point, exactly?
-
Compared to actual development time, C++ is an order of magnitude less productive than vb.net.
Dwayne J. Baldwin
... 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.
-
never underestimate the powers of pure C++ ... in general 40 to 50 % faster than any runtime.
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...