[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: update "exit with stopped jobs" patch
From:       "Roberto A. Foglietta" <roberto.foglietta () gmail ! com>
Date:       2023-08-10 5:17:04
Message-ID: CAJGKYO6H8i7yk_YFwO4Xf23sgaOJK7ZZR8XzC8HPGpwZRaKujg () mail ! gmail ! com
[Download RAW message or body]

On Thu, 10 Aug 2023 at 06:20, Roberto A. Foglietta
<roberto.foglietta@gmail.com> wrote:

> Unfortunately, this dilemma cannot be solved by simply choosing -Os
> rather than -O3 compilation flags. However, in some cases, a #define
> set from .config can decide to privilege speed versus size.

About this above, I wish to point out that busybox source code can be
divided mainly into three categories:

1. the ash, which in the embedded system is supposed to be the default
shell and the only one, therefore, it is always running in interactive
mode or as a shell interpreter;
2. the lib busybox (libbb), which is a shared source code among many
applets as much as possible, a group of functions that are frequently
called and put in run;
3. everything else

Under this PoV, parts #1 and #2 can be compiled with -O2 or -O3 while
for the rest, -Os could be fine as well. In fact, if ifconfig takes a
little longer to execute from the perspective of an interactive user,
there is no difference. Some other applets are most involved in
scripting, like grep, sed and awk or cat and dd. However, {grep, sed,
awk, etc.} performances depend on how fast they can handle strings,
while {dd, cat, etc.} how fast they can handle I/O and, in general,
data transfer. Therefore, each applet has its own specific profile of
optimization that can have a little to do with -O3 versus -Os (e.g. a
log(n) or N^2 algorithm will not change because of compilation flags).

I do not think that it will be difficult to put in `make menuconfig`
an option for implementing this division among {1,2} and {3}. What do
you think about it?

Best regards, R-
_______________________________________________
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