[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: [PATCH 0/1] applet_tables: make number of stored offsets depend on NUM_APPLETS
From: Ron Yorston <rmy () pobox ! com>
Date: 2016-04-02 16:08:29
Message-ID: 56ffee7d.YAu8yEQa3WnDQESV%rmy () pobox ! com
[Download RAW message or body]
Denys Vlasenko wrote:
>Yes, that is too simplistic and not optimal. I propose that we select
>KNOWN_APPNAME_OFFSETS with finer granularity:
>
>#if NUM_APPLETS > 128
>// With 129 applets we do two linear searches, with 1..7 strcmp's in
>the first one
>// and 1..16 strcmp's in the second. With 256 apps, second search does
>1..32 strcmp's.
># define KNOWN_APPNAME_OFFSETS 8
>#elif NUM_APPLETS > 32
># define KNOWN_APPNAME_OFFSETS 4
>#else
>// Save code size: do not compile speedup code at all, do only one
>linear search.
># define KNOWN_APPNAME_OFFSETS 0
>#endof
That would give:
applets cycles bloat
13 224.07 0
28 478.79 0
48 318.94 90
72 442.22 90
96 554.67 90
133 520.57 109
172 612.75 109
214 764.11 109
281 941.46 109
364 1162.98 107
494 1468.60 107
I'm OK with that.
Ron
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic