User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 455,964 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,630 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C++ advertiser: Programming Forums
Views: 2065 | Replies: 4
Reply
Join Date: Jul 2004
Location: Pakistan
Posts: 1,673
Reputation: nanosani is an unknown quantity at this point 
Rep Power: 8
Solved Threads: 50
Colleague
nanosani's Avatar
nanosani nanosani is offline Offline
Unauthenticated Liar

Is c # slower than c/c++

  #1  
Aug 22nd, 2004
Is c # slower than c ++? Actually I am a little familiar with c and java ... now I am in a mood to learn c #. Is it better than c and java?
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jun 2004
Posts: 604
Reputation: freesoft_2000 is an unknown quantity at this point 
Rep Power: 6
Solved Threads: 6
freesoft_2000 freesoft_2000 is offline Offline
Practically a Master Poster

Re: Is c # slower than c/c++

  #2  
Aug 22nd, 2004
hi everyone,
From what i gather from other websites about C# is that it slower than
c/c++ because it uses a runtime and sdk to intrepret its codings just like java.

C# is actually a cross between vb and c++ but it is not as mature as java which has been around for a long time. C# is also not platform dependent at the moment and c# was actually created to counter the popularity of java.

But the slowness is hardly noticable if you running single threads but if you are running multiple threads then the slowness is actually quite noticable.
If you are using win 2000 and above you can try downloading sharpdevelop
or mono develop. Both are under the gpl.

For myself i actually like to do bare bones programming

Yours Sincerely

Richard West
Reply With Quote  
Join Date: Jul 2004
Location: Pakistan
Posts: 1,673
Reputation: nanosani is an unknown quantity at this point 
Rep Power: 8
Solved Threads: 50
Colleague
nanosani's Avatar
nanosani nanosani is offline Offline
Unauthenticated Liar

Re: Is c # slower than c/c++

  #3  
Aug 22nd, 2004
Thanks Richard .. I assume that I should not learn c# by now ... I'll do my project in java.
Reply With Quote  
Join Date: Jun 2004
Location: Marin, CA, USA
Posts: 434
Reputation: Chainsaw is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 10
Chainsaw's Avatar
Chainsaw Chainsaw is offline Offline
Unprevaricator

Re: Is c # slower than c/c++

  #4  
Aug 22nd, 2004
Playing devil's advocate for a moment....

You asked first if C# was FASTER, but then you asked "Is it better than c and java?"

So, I suppose the age old question is, better for WHAT? C# is designed to more easily deal with COM objects than C++, and so if you are doing a project with a bunch of COM objects you could argue that C# is better than C++.

Speed of execution, as you know, only matters in certain very small instances. Like, you are doing some tight loop calculation over and over. For example, rendering ray tracing. But even then, you could write small parts of your program in some fast language and the rest (the bulk) in a language that is 'better' in some other direction. For most apps, by the time the app is released, machines will have doubled in speed anyway, so every effort-hour you spend on making that old 500MHZ Pentium run faster is totally wasted when the 4GHZ pentiums are available!


For me, what makes a language 'better' or 'worse' are issues like:
1) What kind of app am I building? A test app? Something for customers?
2) How hard is it to learn and read; can I read someone else's code pretty easily?
3) How quickly can I build the app? I.e. assembler is great but would take a LONG time.
4) How likely is it to catch my errors for me? i.e. compiler-time warnings/errors vs runtime warnings/errors vs not catching them at all. Generally, run-time binding leads to run-time errors that compile-time binding catches at compile time. So if you are building something for customers, I generally lean towards compile-time binding. That's not always realistic, but every error of mine that the compiler catches is better than the customer seeing error dialogs about my errors!
5) What is everyone else using? For personal use, that doesn't matter (heck, I still like Snobol IV!), but if you are in Rome, do as the Romans. If your company has a lot of Java engineers, you better have a darn good reason to switch to C# or C++!

So, I appreciate the 'speed at any cost' argument, but that's what assemblers are for! Even when programming in C++, you may find that rare but occasional need to drop into assembler (I love the inline assembler!), just as when programming in Java there are somethings you call out and let some other piece of code do.

My advice: Learn C# and know it so you can make an informed decision on whether to use it for any particular application or not. Just as a carpenter knows about all kinds of tools but uses 10% of them daily, so too should you know many more languages than you use.

Then you and I can speak fondly of Snobol IV and lament its lack of general use.

Good luck! Dare to Dream!
Reply With Quote  
Join Date: Jul 2004
Location: Pakistan
Posts: 1,673
Reputation: nanosani is an unknown quantity at this point 
Rep Power: 8
Solved Threads: 50
Colleague
nanosani's Avatar
nanosani nanosani is offline Offline
Unauthenticated Liar

Re: Is c # slower than c/c++

  #5  
Aug 23rd, 2004
Thank you very much for so long a reply. You have forced me into learning atleast the basics of c#. I'll be starting soon. Cheers.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb C++ Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the C++ Forum

All times are GMT -4. The time now is 9:04 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC