Ron Yorston bcf91d2760 libbb: code shrink and speed up index_in_strings()
Rewrite index_in_strings() to replace calls to strcmp()/strlen().
With this change searching for valid names in the applet_names
array (for example) is 40% faster.

The code has to assume the strings aren't sorted, so will always scan
the entire array when presented with an invalid name.

function                                             old     new   delta
index_in_strings                                      63      56      -7
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-7)               Total: -7 bytes

Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2021-02-02 14:37:37 +01:00
..
2020-08-13 17:12:56 +02:00
2020-12-14 18:25:28 +01:00
2020-12-17 11:22:44 +01:00
2020-10-25 23:44:22 +01:00
2013-02-26 00:36:53 +01:00
2012-10-03 09:42:21 +02:00
2020-10-01 03:07:22 +02:00
2020-08-13 17:12:56 +02:00
2020-12-21 22:50:23 +01:00
2018-07-17 15:04:17 +02:00
2010-07-26 01:49:12 +02:00
2020-12-17 20:53:43 +01:00
2018-12-08 15:35:24 +01:00
2010-10-29 11:46:52 +02:00
2015-04-02 23:03:46 +02:00

Please see the LICENSE file for copyright information (GPLv2)

libbb is BusyBox's utility library.  All of this stuff used to be stuffed into
a single file named utility.c.  When I split utility.c to create libbb, some of
the very oldest stuff ended up without their original copyright and licensing
information (which is now lost in the mists of time).  If you see something
that you wrote that is mis-attributed, do let me know so we can fix that up.

	Erik Andersen
	<andersen@codepoet.org>