Rockbox

Tasklist

FS#12136 - Save some binsize in tagtree.c

Attached to Project: Rockbox
Opened by Nils Wallménius (nls) - Sunday, 29 May 2011, 19:47 GMT
Last edited by Nils Wallménius (nls) - Tuesday, 31 May 2011, 19:45 GMT
Task Type Patches
Category Database
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Release 3.8.1
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

This patch replaces a macro for testing string equality used many times with loops over arrays of pointers. Saves about 700bytes on a cf build.
This task depends upon

Closed by  Nils Wallménius (nls)
Tuesday, 31 May 2011, 19:45 GMT
Reason for closing:  Accepted
Additional comments about closing:  comitted
Comment by Andree Buschmann (Buschel) - Monday, 30 May 2011, 05:49 GMT
Saves ~1200 Byte on a nano 2G build.
Comment by amaury pouly (pamaury) - Monday, 30 May 2011, 07:28 GMT
Looks like a reasonable thing to do.
Comment by sideral (sideral) - Monday, 30 May 2011, 09:58 GMT
My initial testing looks good. I'll report back after some more testing in a couple of days.

Maybe you could save even more binsize by factoring out the loops as well (into a small utility function)?
Comment by Nils Wallménius (nls) - Tuesday, 31 May 2011, 14:23 GMT
Thanks for testing, i made a quick test with the matching loop broken out into a separate function but it made no significant change to size (12 bytes bigger on cf, same size on arm (gigabeast))
Comment by sideral (sideral) - Tuesday, 31 May 2011, 18:17 GMT
My testing over the last few days has not revealed any issues. I think you can commit this patch. Cheers!

Loading...