473,804 Members | 3,712 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Time and memory performance of C versus C++

A lot of research has been done to prove that the contention that C
code is more efficient and more compact than equivalent C++ code is a
myth. My posting pertains to a slightly different aspect of this
debate. Here are my two questions:

1) Does anyone have any information on comparison of C and C++
software written for the ARM processor?

2) Are there any compiler and CPU dependencies that have to be
factored in while debating this issue? Or, is the issue more or less
settled for all compilers and all CPUs?

Thanks,
Kandregula Anil K.

Nov 9 '07 #1
62 2370
Generic Usenet Account wrote:
A lot of research has been done to prove that the contention that C
code is more efficient and more compact than equivalent C++ code is a
myth.
I'll take your word for it.
My posting pertains to a slightly different aspect of this
debate. Here are my two questions:

1) Does anyone have any information on comparison of C and C++
software written for the ARM processor?

2) Are there any compiler and CPU dependencies that have to be
factored in while debating this issue?
No. There is no point in debating this "issue" whatsoever. I am
sure that among my brethren in 'comp.lang.c' there will be somebody
with a different opinion, of course.
Or, is the issue more or less
settled for all compilers and all CPUs?
http://www.research.att.com/~bs/bs_faq.html#C-is-better Do you see
any mention of a platform or CPU?

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Nov 9 '07 #2
Generic Usenet Account wrote:
A lot of research has been done to prove that the contention that C
code is more efficient and more compact than equivalent C++ code is a
myth. My posting pertains to a slightly different aspect of this
debate. Here are my two questions:

1) Does anyone have any information on comparison of C and C++
software written for the ARM processor?
One can write piss poor inefficient code in either language, or one can
write elegant efficient code in either. Programmers write code, not
compilers, so there isn't anything to study or discuss.

--
Ian Collins.
Nov 9 '07 #3
On Nov 9, 2:48 pm, Ian Collins <ian-n...@hotmail.co mwrote:
Generic Usenet Account wrote:
A lot of research has been done to prove that the contention that C
code is more efficient and more compact than equivalent C++ code is a
myth. My posting pertains to a slightly different aspect of this
debate. Here are my two questions:
1) Does anyone have any information on comparison of C and C++
software written for the ARM processor?

One can write piss poor inefficient code in either language, or one can
write elegant efficient code in either. Programmers write code, not
compilers, so there isn't anything to study or discuss.

--
Ian Collins.
These days with 3ghz computers with more than 1 gbyte RAM what is so
important about elegant, efficient code?
Nov 9 '07 #4
edie...@rcn.com wrote:
....
These days with 3ghz computers with more than 1 gbyte RAM what is so
important about elegant, efficient code?
As our computers get more powerful, the problems we try to solve with
them get more difficult. If you have a program which takes 10 days to
run on a 3-GHz machine with 1GB RAM, an algorithm change that causes a
speed-up by a factor of 2 is going to look pretty sweet.

Truly elegant code is easier to understand and maintain; with
programmer time costing so much more than CPU time, elegance is
getting steadily more important, not less.

Nov 9 '07 #5
Generic Usenet Account wrote:
A lot of research has been done to prove that the contention that C
code is more efficient and more compact than equivalent C++ code is a
myth. My posting pertains to a slightly different aspect of this
debate. Here are my two questions:

1) Does anyone have any information on comparison of C and C++
software written for the ARM processor?
Platform or C++ specific questions, are off-topic in c.l.c
2) Are there any compiler and CPU dependencies that have to be
factored in while debating this issue? Or, is the issue more or less
settled for all compilers and all CPUs?
Compiler or CPU specific questions, are off-topic in c.l.c
--
Tor <bw****@wvtqvm. vw | tr i-za-h a-z>
Nov 9 '07 #6
ed*****@rcn.com wrote:
On Nov 9, 2:48 pm, Ian Collins <ian-n...@hotmail.co mwrote:
>Generic Usenet Account wrote:
>>A lot of research has been done to prove that the contention that C
code is more efficient and more compact than equivalent C++ code is a
myth. My posting pertains to a slightly different aspect of this
debate. Here are my two questions:
1) Does anyone have any information on comparison of C and C++
software written for the ARM processor?
One can write piss poor inefficient code in either language, or one can
write elegant efficient code in either. Programmers write code, not
compilers, so there isn't anything to study or discuss.
*Please* don't quote signatures
>
These days with 3ghz computers with more than 1 gbyte RAM what is so
important about elegant, efficient code?
Do you have any pride in your work?

--
Ian Collins.
Nov 9 '07 #7
ed*****@rcn.com wrote:
>
These days with 3ghz computers with more than 1 gbyte RAM what is so
important about elegant, efficient code?


Hey, that's great! Where can I pick up one of these 3ghz 1GB RAM
computers? I need it to be about 3 cm by 3 cm all in, drawing no more
than one amp of current and using about 10W of power, with a JTAG port
on board.

What's that, you say? There's no such thing? Well then, I guess I'll
have to use whatever I can get in that size, current and power
limitations and just do some damned elegant coding to get it to do what
I need.

Lift your head from the keyboard once in a while, chum. There's more to
computing that desktop PCs.

'Chops
Nov 9 '07 #8
moschops wrote:
ed*****@rcn.com wrote:
>>
These days with 3ghz computers with more than 1 gbyte RAM what is so
important about elegant, efficient code?



Hey, that's great! Where can I pick up one of these 3ghz 1GB RAM
computers? I need it to be about 3 cm by 3 cm all in, drawing no more
than one amp of current and using about 10W of power, with a JTAG port
on board.

What's that, you say? There's no such thing? Well then, I guess I'll
have to use whatever I can get in that size, current and power
limitations and just do some damned elegant coding to get it to do what
I need.

Lift your head from the keyboard once in a while, chum. There's more to
computing that desktop PCs.

'Chops
Even in desktop's PCs that philosophy is utterly WRONG and leads to
software that takes gigabytes to do the simplest thing. Of course if you
have 2GB or 4GB of memory it doesn't matter... UNTIL YOU WANT TO RUN
A DOZEN OF THOSE!

--
jacob navia
jacob at jacob point remcomp point fr
logiciels/informatique
http://www.cs.virginia.edu/~lcc-win32
Nov 9 '07 #9
"moschops" <mo*****@madasa fish.comwrote in message
ed*****@rcn.com wrote:
>>
These days with 3ghz computers with more than 1 gbyte RAM what is so
important about elegant, efficient code?

Hey, that's great! Where can I pick up one of these 3ghz 1GB RAM
computers? I need it to be about 3 cm by 3 cm all in, drawing no more than
one amp of current and using about 10W of power, with a JTAG port on
board.

What's that, you say? There's no such thing? Well then, I guess I'll have
to use whatever I can get in that size, current and power limitations and
just do some damned elegant coding to get it to do what I need.

Lift your head from the keyboard once in a while, chum. There's more to
computing that desktop PCs.
Yes, but typically embedded processors do jobs which are utterly trivial.
Like turn on a few lights in a washing machine.

--
Free games and programming goodies.
http://www.personal.leeds.ac.uk/~bgy1mm
Nov 9 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

77
4614
by: Charles Law | last post by:
Hi guys I have a time critical process, running on a worker thread. By "time critical", I mean that certain parts of the process must be completed in a specific time frame. The time when the process starts is not especially important, but it must be complete within a small number of seconds. The operations I am performing do not take a long time (hundreds of milliseconds), but as each part of the process is complete, my worker thread...
18
10329
by: Robin Lawrie | last post by:
Hi again, another problem! I've moved from an Access database to SQL server and am now having trouble inserting dates and times into seperate fields. I'm using ASP and the code below to get the date and time, but my script is erroring. '-- Get login date and time cmdLoginDate = Date() cmdLoginTime = Time()
38
2567
by: vashwath | last post by:
Might be off topic but I don't know where to post this question.Hope some body clears my doubt. The coding standard of the project which I am working on say's not to use malloc.When I asked my lead(I have just started working) he said we should not use dynamic allocation in real time systems, the code will not run in predictable time period.Can anybody tell what does he mean?Why the execution time becomes unpredictable? Thanks
14
2485
by: spamtrap | last post by:
Mostly for testing reasons I'd like to see if it makes sense to chose the following approach for just-in-time compilation of shaders for a renderer: Seeing as the shaders themsefs consist mostly of very basic operations I'd like to translate them into assembly, have an assembler compile the binary code and then call the resulting machine code from c++. The thing is that up until now I have only used inline assembly in my c++ projects,...
63
2301
by: Generic Usenet Account | last post by:
A lot of research has been done to prove that the contention that C code is more efficient and more compact than equivalent C++ code is a myth. My posting pertains to a slightly different aspect of this debate. Here are my two questions: 1) Does anyone have any information on comparison of C and C++ software written for the ARM processor? 2) Are there any compiler and CPU dependencies that have to be factored in while debating this...
0
9706
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
1
10323
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10082
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9157
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7621
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6854
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5525
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5652
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3821
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.