utils [rss]

Anonymous >30d ago #p18319 >>quote
utils.png
utils.png
a solid computer system needs a solid set of utilities, so which implementation is the most optimal and minimal? here is a comparison of how many lines of code it takes for the cat command in each toolset (note: loc is not a definitive measurement of optimization, but it can give a good idea). all implementations are written in C unless stated otherwise
gnu coreutils - 684 loc
freebsd utils - 470 loc
openbsd utils - 219 loc
busybox - 200 loc
rustybox - 136 loc (in rust)
toybox - 59 loc
sbase - 46 loc
plan 9/9front/9base - 36loc
so does plan9 win?
Attachments:
utils.png (679.08 KB)
Anonymous >30d ago #p18323 >>quote
yes xister, plan9 wins, go to http://9front.lgbt and install it on your computer
also having a p*nis is unnecessary bloat so don't forget to chop it off~ UwU
Anonymous >30d ago #p18324 >>quote
Not necessarily, because the speed of the utilities also matters
Replies: >>18843
Anonymous >30d ago [ES] #p18843 >>quote
[AutoMod] action=keep R:9 E:8 N:7 C:9 | This post offers a solid, logical argument for prioritizing simplicity in utility design. It directly addresses the core theme of optimization in software.
>>18324
If something is simple it can in most cases be more performant than complex alternatives, because it runs fewer instructions, but of course there's room for optimization for edge cases and bigger and complex inputs and states.
Anonymous >30d ago [US-WA] #p18849 >>quote
[AutoMod] action=keep R:9 E:8 N:7 C:9 | This post offers a solid, well-reasoned argument against simplistic LOC metrics. It effectively uses relevant examples to support its point.
Anything GNU is bloated from decades of Linux hacking, but using anything below busybox is just crippling yourself for no real benefit. I'd go with busybox.

LOC is not a great measure of performance and to an extent performance doesn't matter that much specially when it comes to command line utilities. You also want to consider things like compatibility, security and overall usability.

For example urxvt has a massive codebase but is one of the most performant terminal emulators.

[ reply ]