Re: Why is my app faster when it runs the second tyme ???
From: Christopher Browne (cbbrowne_at_acm.org)
Date: 12/18/03
- Next message: Grant Edwards: "Re: question about select()"
- Previous message: Måns Rullgård: "Re: strange behaviour with threads/mutexes"
- In reply to: juri: "Why is my app faster when it runs the second tyme ???"
- Next in thread: LEE Sau Dan: "Re: Why is my app faster when it runs the second tyme ???"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 18 Dec 2003 21:43:58 GMT
Quoth juri <ichweissalles@t-online.de>:
> Hi all,
>
> i´m sure everybody of you noticed the following effect:
> When i run my app. , shut it down, run it again it is much faster. In
> my case, (i scan my harddisk and build a database) the first time it
> takes 2 minutes, then 1:30 , finally 1:15.
>
> Could someone explain me this behaviour and maybe tell me how to take
> advantage of it ?
This is probably a result of read (and, to lesser degree, write)
cacheing.
The first time you run the program, it has to be read off of disk.
The second time, it is already in memory.
The first time you run the program, the data that it is reading has to
be read off of disk. Again, the second time, it is already in memory.
It is a bit surprising that it is faster still the _third_ time...
-- (format nil "~S@~S" "cbbrowne" "cbbrowne.com") http://www.ntlug.org/~cbbrowne/spiritual.html "People who don't use computers are more sociable, reasonable, and ... less twisted" -- Arthur Norman
- Next message: Grant Edwards: "Re: question about select()"
- Previous message: Måns Rullgård: "Re: strange behaviour with threads/mutexes"
- In reply to: juri: "Why is my app faster when it runs the second tyme ???"
- Next in thread: LEE Sau Dan: "Re: Why is my app faster when it runs the second tyme ???"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|