Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Time and memory performance of C versus C++

Reply
Thread Tools

Time and memory performance of C versus C++

 
 
jacob navia
Guest
Posts: n/a
 
      11-09-2007
moschops wrote:
> http://www.velocityreviews.com/forums/(E-Mail Removed) 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
 
Reply With Quote
 
 
 
 
Malcolm McLean
Guest
Posts: n/a
 
      11-09-2007
"moschops" <(E-Mail Removed)> wrote in message
> (E-Mail Removed) 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


 
Reply With Quote
 
 
 
 
Flash Gordon
Guest
Posts: n/a
 
      11-09-2007
(E-Mail Removed) wrote, On 09/11/07 20:48:
> On Nov 9, 2:48 pm, Ian Collins <(E-Mail Removed)> wrote:
>> 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 **** 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.


Please don't quote sigs, the bit typically after the "-- ".

> These days with 3ghz computers with more than 1 gbyte RAM what is so
> important about elegant, efficient code?


You have a 3GHz processor with 1GB RAM in your microwave oven? Do you
think efficiency does not matter if you have a few hundred simultaneous
users on your server? Just to name two of the many reasons why
needlessly inefficient code is a problem.
--
Flash Gordon
 
Reply With Quote
 
moschops
Guest
Posts: n/a
 
      11-09-2007
Malcolm McLean wrote:
> "moschops" <(E-Mail Removed)> wrote in message
>> (E-Mail Removed) 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.
>


Typically. But, of course, some of them do things that are far from
trivial. Hacks who make comments about how there's no need for elegance
in coding can do the washing machines, and the rest of us can do the
non-trivial stuff.

'Chops
 
Reply With Quote
 
Flash Gordon
Guest
Posts: n/a
 
      11-09-2007
Malcolm McLean wrote, On 09/11/07 21:54:
> "moschops" <(E-Mail Removed)> wrote in message
>> (E-Mail Removed) 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.


Or image recognition in real time, of performing 42 simultaneous
correlation calculations to detect signals well below the noise
threshold and extract information off them that is encoded in variations
of the bit width and simultaneously calculate the relative velocity of
the receiver and transmitter based on the dopler shift. Or perform real
time MPEG compression. Or...

Well, suffice to say that vast numbers of embedded processors, including
embedded processors in the computer I am using, the TV I am watching, my
DVD player and my surround sound decoder are doing complex tasks
involving a lot of computation.
--
Flash Gordon
 
Reply With Quote
 
cr88192
Guest
Posts: n/a
 
      11-09-2007

"jacob navia" <(E-Mail Removed)> wrote in message
news:fh2i48$b1u$(E-Mail Removed)...
> (E-Mail Removed) wrote:
>> On Nov 9, 2:48 pm, Ian Collins <(E-Mail Removed)> wrote:
>>> 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 **** 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?
>>
>>

>
> This is the attitude that leads to shitty and bloated programs.
>
> Since shitty programs are the way to go (they cost less effort
> to write, they lead to the user buying a new machine, they make the
> economy go round) you are right of course.
>
> Let's write the new computer language: C# running in a virtual
> machine written in GWBASIC.
>
>


or an OS that makes a 4.4 GHz machine with 2GB ram drag along slowly as crap
goes in and out of swap, where half my software doesn't work right, where
even basic crap that existed before is gone, where the web browser crashes
if one even looks at it too hard, where one discoveres that one app can
cause another to crash, and where one can only have a few different apps
open before the OS starts going insane and breaking...

in this OS we can pretend that local file copies are going over the LAN or
something given how fast they are going...

good job that...


it was enough in time to cause me to install go over to using XP on this box
(even though it came with said OS in question, which is all so theoretically
newer and better...). then one (eventually) discoveres certain other
annoyances, namely that certain OEMs had the amazing idea of no longer
making XP drivers for some of their hardware, causing the user to go dig
around for something that still works...

like, what if someone decides to go and buy one of their newer MOBOs, and
has no intention to use said newer OS, only to find that the chipset drivers
lack certain key components (like, for example, the onboard sound)
apparently only available if one uses said newer shinier OS...

and why is it that all this stuff has not long since become defacto
standardized anyways?... I remember a short time when damn near every
soundcard around would work if one just used SoundBlaster drivers...

looks to me like a great conspiracy between the HW vendors and this certain
OS vendor...


this is the face of the future it seems...

or such...


>
> --
> jacob navia
> jacob at jacob point remcomp point fr
> logiciels/informatique
> http://www.cs.virginia.edu/~lcc-win32



 
Reply With Quote
 
ediebur@rcn.com
Guest
Posts: n/a
 
      11-09-2007
On Nov 9, 5:10 pm, moschops <(E-Mail Removed)> wrote:
> Malcolm McLean wrote:
> > "moschops" <(E-Mail Removed)> wrote in message
> >> (E-Mail Removed) 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.

>
> Typically. But, of course, some of them do things that are far from
> trivial. Hacks who make comments about how there's no need for elegance
> in coding can do the washing machines, and the rest of us can do the
> non-trivial stuff.
>
> 'Chops


Jeez, I just brought it up as a topic for discussion, didn't mean for
anyone to get nasty

 
Reply With Quote
 
red floyd
Guest
Posts: n/a
 
      11-09-2007
Malcolm McLean wrote:

>>

> Yes, but typically embedded processors do jobs which are utterly
> trivial. Like turn on a few lights in a washing machine.
>


To quote Pauli.... This isn't right. It isn't even wrong.

Lets see.... avionics, video codec, audio codec, other multimedia,
printer engine....

Yeah, those are just turning on a few lights.
 
Reply With Quote
 
Juha Nieminen
Guest
Posts: n/a
 
      11-09-2007
(E-Mail Removed) wrote:
> These days with 3ghz computers with more than 1 gbyte RAM what is so
> important about elegant, efficient code?


Ever played a modern computer game with millions of polygons per
level, even tens of thousands of polygons visible at the same time,
complex physics, etc? Do you want to play that kind of game at 0.5
frames per second or at 30 frames per second in your 3GHz computer?
 
Reply With Quote
 
Duane Hebert
Guest
Posts: n/a
 
      11-10-2007
> These days with 3ghz computers with more than 1 gbyte RAM what is so
> important about elegant, efficient code?



Missed the bit from the OP about Arm did you? Sort of topical
for me since I've spent the last two days trying to crowbar Chinese
fonts into an XScale Arm product.



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Mozilla versus IE versus Opera versus Safari Peter Potamus the Purple Hippo Firefox 0 05-08-2008 12:56 PM
equal? versus eql? versus == versus === verus <=> Paul Butcher Ruby 12 11-28-2007 06:06 AM
Time and memory performance of C versus C++ Generic Usenet Account C++ 68 11-26-2007 08:19 AM
Sony Memory Stick PRO versus regular Memory Stick (speed factor) eb7g Digital Photography 3 12-09-2004 11:51 PM
Web Form Performance Versus Single File Performance jm ASP .Net 1 12-12-2003 11:14 PM



Advertisments