Many smaller files make it run much faster?

When we split C++ program into smaller files, does it run faster during executing time?

My experience is that it runs significantly faster.

My workstation is having 6GB of RAM, I guess there shouldn't have any performance impact even if we use a single source file of bigger size.

How to explain..?
Last edited on
No matter how many files your project contains, they're all linked together into one big .exe, so it won't run faster. Or do you mean .dll's?
It's not dll, but just normal project files for a single application.
I experienced it running faster after splitting into smaller files.
I also doubt that could really happen.
If you mean to say you experienced it compiling faster after splitting it into smaller files, that is entirely possible but it should not impact the performance of the generated executable.
I see, maybe it was just wrong impression. I didn't really time it.
Thanks a lot.
Last edited on
I have seen significantly different speed executables generated depending on the order of object files on the link line.
This was using gcc
Topic archived. No new replies allowed.