Jump to content
  • Advertisement
Sign in to follow this  
Challenger17

CPU can remember what he executed just before?

This topic is 5146 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i believe many ppl have the experience that if we run a same program for twice(or more), our CPU would execute it faster in the second time(& the third, fourth...). for an example, if i turns my PC's power on, after entering Microsoft Windows, i open the Internet Explorer, close it, open it again, i would find the second time i open IE is obviously faster than the first time. is this the effect of buffers in CPU? i don't quite understand. could anybody tell me? thx!

Share this post


Link to post
Share on other sites
Advertisement
I'm guessing it's being cached somewhere...
Also, the first time you fire up your PC it's still crunching away for a few minutes as it loads, so stuff loads a lot slower. Also, when you close the program, it might keep some bits and bobs loaded running in the background.

Share this post


Link to post
Share on other sites
The boosted speed in the case of launching an app a second time isn't due to CPU caches. It's due to disk caches (some percentage of RAM is used to remember what was just accessed on disk), and shared libraries being loaded (IE will load a bunch of DLLs. It will stop using them when you quit, but Windows can keep them in memory in case another app needs them).

CPU caches tend to be small, and take advantage of the fact that programs often (well, nearly always) loop, and often perform multiple actions on the same data. Keeping the code and data around, rather than fetching it from memory, speeds things up enormously.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!