View Single Post
  #42  
Old February 26th 19, 10:55 AM posted to alt.windows7.general,comp.lang.c,comp.programming,alt.comp.os.windows-10
Wouter Verhelst
external usenet poster
 
Posts: 11
Default C is not a low level language

On 25/02/2019 20:40, nospam wrote:
In article , Wouter Verhelst
wrote:

code that is not called can't slow anything down.


That's actually not true.


it is true. what matters is the code that *is* called.


You're saying that the code can't slow thing down if it's not called.
That's a fairly absolute statement; I just showed you a counter-example,
and so did Scott. So your absolute statement is just *wrong*.

Code that is not called but is compiled in will use up space in a memory
page. If that means the code segment of the program grows beyond a page
boundary, that may then mean an extra page fault will need to be handled
when part of the program is swapped out, which would otherwise not be
necessary.


that's more theoretical than anything real.


It does happen though, and the more "not called" code you add to a
program the larger the chances of this happening.

Also, it pollutes the processor cache, as Scott pointed out, which will
be more likely.

nearly everything is i/o bound, and then there are all the other
processes...


It's precisely the other processes which will cause (part of) your
program to get (partially) paged out if it is huge, which will cause
your slowdowns.
Ads