Rockbox

Tasklist

FS#8179 - MPC: small speed up

Attached to Project: Rockbox
Opened by Andree Buschmann (Buschel) - Saturday, 17 November 2007, 23:19 GMT
Last edited by Thom Johansen (preglow) - Monday, 19 November 2007, 16:31 GMT
Task Type Patches
Category Codecs
Status Closed
Assigned To No-one
Operating System PortalPlayer-based
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Small speed up for mpc decoding (+2.7%).

Changes:
- reduced ldmia-calls through reading 8 instead of 4 register in one single ldmia
This task depends upon

Closed by  Thom Johansen (preglow)
Monday, 19 November 2007, 16:31 GMT
Reason for closing:  Accepted
Comment by Thom Johansen (preglow) - Monday, 19 November 2007, 00:05 GMT
Are you absolutely sure this patch is any faster? Theoretically, you're saving four cycles per loop here, and in the process using so many registers that even common variables like the loop counter 'k' is evicted from the registers and needs to be reloaded on each loop end, something which takes 3 cycles, and a further 3 cycles to store back.
Comment by Andree Buschmann (Buschel) - Monday, 19 November 2007, 06:31 GMT
Had similar thoughts about this. Nevertheless the measurement from svn against this change clearly shows the small speed up (at least on 5G).
Comment by Thom Johansen (preglow) - Monday, 19 November 2007, 11:46 GMT
For the speed optimized case, there is _just_ enough regs left for the counter, but not in the unoptimized case. Have you checked if that is any faster too?
Comment by Andree Buschmann (Buschel) - Monday, 19 November 2007, 12:04 GMT
Now you've got me :/ I'll retest and post results as well as (maybe) a corrected patch.
Comment by Andree Buschmann (Buschel) - Monday, 19 November 2007, 16:25 GMT
Ok, tested in non-optimized case. It's 279.99% (new) against 279.93% (svn) -- so still a bit faster :o)
Nevertheless I will undo the changes for non-optimized case as it's better to leave code as is, if there is no significant result.

Loading...