473,387 Members | 1,606 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Speed and execution of C and C++

In terms of speed, how fast is the execution time of C++/C?
Dec 20 '07 #1
4 1756
I dont think that C++ code will be faster than C code. Instead C code is faster than C++ code. Just see the earlier machine/assembly programs are much faster because that contains the statements which directly interfaced with OS system calls. So on same basis, I am saying that.

Regards,
Raj Kr Arora
Dec 20 '07 #2
weaknessforcats
9,208 Expert Mod 8TB
I dont think that C++ code will be faster than C code. Instead C code is faster than C++ code.
In some case this might be actually true but usually C++ is faster than C. For example, the STL basic_string template class consistently outperforms the C string library.

You would beed to measure the same application coded in C and in C++.

Don't be surprised if the C++ version is completed sooner and runs faster.
Dec 20 '07 #3
hello
The execution of c programming code faster than c++ since it C libarary more portable to contact assembly langaue .in C++ there are heavy loaded libaray eg.STL than C
Dec 21 '07 #4
weaknessforcats
9,208 Expert Mod 8TB
The execution of c programming code faster than c++ since it C libarary more portable to contact assembly langaue
There is nothing in C that you can't code exactly the same way in C++.

No one says you have to use C++ feature that are not part of C.

.in C++ there are heavy loaded libaray eg.STL than C
A common misconception. Generally, basic_string is faster than the C-string library and vector has no overhead compared to the array handling code that you would have to write yourself. The difference is you write the same array code over an over whereras you just use the vector.
Dec 21 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

13
by: Yang Li Ke | last post by:
Hi guys, Is it possible to know the internet speed of the visitors with php? Thanx -- Yang
4
by: EP | last post by:
On questions of the suitability of Python for CGI, embedded apps, etc., execution speed comes to mind. I previously read some comparisons which did not show Python in a good light in this regard:...
28
by: Maboroshi | last post by:
Hi I am fairly new to programming but not as such that I am a total beginner From what I understand C and C++ are faster languages than Python. Is this because of Pythons ability to operate on...
40
by: Steve Juranich | last post by:
I know that this topic has the potential for blowing up in my face, but I can't help asking. I've been using Python since 1.5.1, so I'm not what you'd call a "n00b". I dutifully evangelize on the...
3
by: linvin333 | last post by:
Hi, Does function overloading affect the speed of execution of the program ? If so what is the reason ? How does it compare with a speed of a program using non-overloded functions ? Linny
9
by: nicolas.hilaire | last post by:
Hi all, i need to choose a langage for porting my vb application to dot net 2.0 in november. For some components, low-level components, i want to know if it can be better to use specific .net...
4
by: Il Prof | last post by:
Hi to everyone! ;) In C language on Linux, what string access method is faster? 1) Puntatori char str="hello"; char* pstr; pstr = str; // access such as "*pstr"
12
by: Marty | last post by:
Hi, I am building an application that need high speed of execution. There is a lot of string parsing that I do in VB.NET. Do I gain in speed if all that string parsing is made in a dll coded...
3
by: serge | last post by:
How do I determine which method I should use if I want to optimize the performance of a database. I took Northwind's database to run my example. My query is I want to retrieve the Employees'...
40
by: kavi | last post by:
Hello friends, Could any one tell the way of calculating the speed of c program execution?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.