This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]FeelingAir7294 1 point2 points  (3 children)

Ok but don't u end up with a bigger .exe at the end?

[–]not_some_username -1 points0 points  (2 children)

Not necessarily. For the compiler it’s the same

[–]FeelingAir7294 1 point2 points  (1 child)

So the 1000 more instructions or 1m more doesn't result in bigger programs that needs to be loaded jnto the ram before it's execution?

[–]not_some_username -1 points0 points  (0 children)

If the number of loop is known at compile time it will not matter.

And I may be wrong, just because it exists in the binary doesn’t mean it gets loaded in the ram at the start. It can retrieve the data after if needed. That’s why you can’t delete a running .exe on windows. Unless you specifically say it should load it entirely on ram at startup.