Why is my ruby application running faster the second time?

Posted by Omega on Programmers See other posts from Programmers or by Omega
Published on 2012-06-23T20:56:55Z Indexed on 2012/06/23 21:24 UTC
Read the original article Hit count: 233

Filed under:

I'm creating a Ruby game using the Gosu framework. All good.

Sometimes, when I run the game, it has some kind of slow startup, and probably it will be rather slow during the whole game. So I close it and... open it again. It is very likely that it will startup quickly and the whole game will run smoothly and fast.

Why is that? What is this phenomenon? Is it faster because of some cache stored or whatever since the first run? (But why would cache be stored? If the app dies, I would expect no references at all etc...)

Ruby, Windows 7.

© Programmers or respective owner

Related posts about Performance