Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Bounds checking and safety in C

Reply
Thread Tools

Bounds checking and safety in C

 
 
Kelsey Bjarnason
Guest
Posts: n/a
 
      08-07-2007
[snips]

On Fri, 03 Aug 2007 18:53:07 +0200, Peter J. Holzer wrote:

> CPU usage only accounts for a small time of the run time of a program,
> so increasing the CPU usage by 63.9% (or conversely, reducing it by 39%)
> doesn't change the overall runtime much. (As an example, look at all
> those programs written in scripting languages: They typically have a lot
> more overhead than 60%. Yet the performance is adequate.


For some things, sure. Not for others.

I've worked on several small apps written in things such as PHP where
language features made the scripting approach more appealing than using C
or C++, but when doing testing the actual performance was so poor that I
tossed 'em entirely and went back to C.

If code exists in an already latency laden environment, such as a web
page, a little extra overhead doesn't matter, particularly when the code
doesn't actually do all that much; even with a lot of overhead compared to
C, the net result isn't that much in absolute terms. Now try the same
thing with, oh, a chess-playing program - the overhead is quite sufficient
to render the app essentially useless.
 
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
Changing the meaning of the array indexing brackets "[ ]" to do bounds checking and then ... Casey Hawthorne C Programming 15 11-04-2009 03:42 PM
To increase speed on manipulating big arrays in Java with minimal bounds checking, ... Casey Hawthorne Java 16 09-01-2005 06:33 AM
Array bounds checking Chris Java 5 07-06-2005 07:23 AM
I thought that array bounds checking needed two comparisons; however, ... Casey Hawthorne Java 21 06-05-2004 08:04 PM
Macro argument bounds checking? Jim Cook C Programming 7 09-22-2003 02:50 AM



Advertisments