View Single Post
  #8 (permalink)  
Old 03-18-2009, 05:23 PM
OrBy's Avatar
OrBy
PPCGeeks Regular
Offline
 
Join Date: Aug 2008
Posts: 72
Reputation: 115
OrBy is keeping up the good workOrBy is keeping up the good work
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Re: Compress EXEs on Diamond (Faster loading and programs)

Quote:
Originally Posted by jonnythan View Post
... How does compressing a file make it load faster? If anything, it would load more slowly since it has to decompress first.
It depends on how much the IO costs to load the file. Please realize that even the flash file systems used on out phones are fairly limited in how fast they can read files (mostly due to the fact that the data buses used are vary narrow). Pair that with the fact that the phones have very fast CPU's and you can start seeing the way this works.

Look at it this way:
(my numbers are not real but just being used to make my point)

Say it takes 1 seconds to load 1mb of data from flash to ram.

Say it takes .2 seconds to decompress 500kb of data to 1mb.

Now say the average file gets compresses 2:1.

Take a 2mb file and load it from flash - that's 2 seconds.
Now take that same file compressed is 1mb and load it from flash and decompress it - that's 1 second to load and .4 seconds to decompress to a total of 1.4 seconds.

You just saved .6 seconds by compressing the exe.

Gains like that can be noticeable!

If a perfect world IO would be as fast as the CPU can take - but in small limited resource systems like our phones - OEM's have made trade off's on cost, speed, power use, ect that open windows for optimizations like this to be explored.

We have already seen where compressing the manilla graphics files speeds up TF3D and most of the major ROM cookers are doing it now. This is really just the next step! (I don't know why some one has not thought of it sooner)

Last edited by OrBy; 03-18-2009 at 05:26 PM.
Reply With Quote
This post has been thanked 1 times.