<div class="gmail_quote">On Thu, Feb 19, 2009 at 1:22 PM, C. Scott Ananian <span dir="ltr"><<a href="mailto:cscott@laptop.org">cscott@laptop.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I'd suggest just uncompressing the various image files and re-timing<br>
as a start.  The initial implementation was uncompressed, but people<br>
complained about space usage on the emulator images (which are<br>
uncompressed).  The current code supports both uncompressed and<br>
compressed image formats.  For uncompressed images, putting the bits<br>
on the screen is an mmap and memcpy, so I can't imagine any<br>
implementation being faster than that (it's possible, of course, that<br>
what's stealing CPU is the shell's invocation of the client program;<br>
recoding just that little part in C should be trivial, since it does<br>
nothing but write to a socket IIRC.)</blockquote><div><br></div><div>I implemented a RLE compressor specifically for these 16bit image files the last time this question came up.  This can certainly be faster than memcpy since we are talking memory performance.  </div>
<div><br></div><div>GZip+RLE also beats plain GZip on size, again due to the contents of the images.</div><div><br></div><div><div><a href="http://wadeb.com/rle.c">http://wadeb.com/rle.c</a></div><div><div><a href="http://wadeb.com/unrle.c">http://wadeb.com/unrle.c</a></div>
<div><br></div><div>-Wade</div><div><br></div></div></div></div>