Rockbox

Tasklist

FS#2858 - Tremor optimizations

Attached to Project: Rockbox
Opened by Brandon Low (lostlogic) - Wednesday, 21 December 2005, 23:05 GMT
Last edited by Brandon Low (lostlogic) - Wednesday, 25 January 2006, 23:54 GMT
Task Type Patches
Category
Status Closed
Assigned To No-one
Operating System
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

Here's a new tremor optimization patch, now based off
of the latest that Lear has checked in.

This patch uses assembly versions of ++, --, and x=*y++
because GCC can't figure its head from coldfire's
instruction set and needs help.

It also converts things like:
x=y[z++];
into:
x=y[z];
z++;
because otherwise gcc moves the z to a temporary
register to use as an index, and then increments the
old, wasting a temp register, and a move instruction.

I also re-arranged the render_point and render_line
functions, render point reduced from 12ish to 6
instructions, and removed a jbsr to __divsi3 by using
the divs instruction, and similar numeric reduction in
length was achieved for render_line although the
percent reduction is less because it's a larger
function. Both of these use inline assembly, #if'd.

It also moves a bunch of stuff around in IRAM. I'm not
sure how the dependencies all work out, but I am
posting profile runs to compare. Only doing the
assembly parts results in a speed change of 0.57%,
doing the whole set with the IRAM change is more than
5% faster, despite profiling an additional function.
This task depends upon

Closed by  Brandon Low (lostlogic)
Wednesday, 25 January 2006, 23:54 GMT
Reason for closing:  Accepted
Additional comments about closing:  Logged In: YES
user_id=838556

Most of this is in current CVS, and the rest isn't really
worthwhile. Closing.
Comment by Brandon Low (lostlogic) - Thursday, 22 December 2005, 01:06 GMT

Hmm, there is one bad hunk in that patch that de-inlines
decode_packed_entry_number. I see no difference in
performance with or without that hunk, but probably better
to inline it than IRAM it.
Comment by Brandon Low (lostlogic) - Wednesday, 25 January 2006, 23:54 GMT

Most of this is in current CVS, and the rest isn't really
worthwhile. Closing.

Loading...