Re: strlcpy and how CPUs can defy common sense

Liste des GroupesRevenir à c misc 
Sujet : Re: strlcpy and how CPUs can defy common sense
De : joerg-mertens (at) *nospam* t-online.de (Joerg Mertens)
Groupes : comp.misc
Date : 28. Jul 2024, 10:42:29
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v853q6$3slc2$1@jmertens.eternal-september.org>
References : 1 2 3 4
User-Agent : tin/2.6.2-20221225 ("Pittyvaich") (OpenBSD/7.5 (amd64)) tinews.pl/1.1.61
Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
On Sat, 27 Jul 2024 19:58:06 -0000 (UTC), John McCue wrote:
 
Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
>
On Fri, 26 Jul 2024 15:36:17 -0000 (UTC), Ben Collver wrote:
 
The situation only gets worse for the openbsd version here, not
better.
 
Not the only time the GNU folks have done something smarter than the
BSD folks.
 
I do not understand this statement in regards to true(1).
 
<http://trillian.mit.edu/~jc/humor/ATT_Copyright_true.html>
 
This is interesting
 
<http://www.theregister.co.uk/2016/02/10/line_break_ep2/>
 
How is GNU's version of true better than OpenBSD's ?
See page 2 in the articke.
 
You have to put the two together to realize how hilariously wrong the
“Register” article is. The OpenBSD version of “true” may seem concise and
elegant, until you notice that it requires the loading of an entirely new
shell instance to run each time.
 
Whereas the GNU version, with its much longer source code entirely in C,
loads faster and runs in less memory. Which was one of the points made in
the first article.

At least Theo de Raadt agrees with you in this commit message from
about eight years ago¹:

-----
Switch back to C versions of true/false.  I do not accept any of the
arguments made 20 years ago.  A small elf binary is smaller and faster
than a large elf binary running a script.  Noone cares about the file
sizes on disk.
-----

The interesting word is `back´, which means, they already had had a
C version in earlier days and then at some point had switched to a
script.  Someone would have to go through CVS history to find the
reason why.

1) https://cvsweb.openbsd.org/src/usr.bin/true/true.c

Date Sujet#  Auteur
26 Jul 24 * strlcpy and how CPUs can defy common sense11Ben Collver
26 Jul 24 +* Re: strlcpy and how CPUs can defy common sense3Stefan Ram
26 Jul 24 i`* Re: strlcpy and how CPUs can defy common sense2Stefan Ram
27 Jul 24 i `- Re: strlcpy and how CPUs can defy common sense1Lawrence D'Oliveiro
27 Jul 24 +* Re: strlcpy and how CPUs can defy common sense5Lawrence D'Oliveiro
27 Jul 24 i`* Re: strlcpy and how CPUs can defy common sense4John McCue
27 Jul 24 i +- Re: strlcpy and how CPUs can defy common sense1Joerg Mertens
28 Jul 24 i `* Re: strlcpy and how CPUs can defy common sense2Lawrence D'Oliveiro
28 Jul 24 i  `- Re: strlcpy and how CPUs can defy common sense1Joerg Mertens
27 Jul 24 `* Re: strlcpy and how CPUs can defy common sense2Bruce Horrocks
27 Jul 24  `- Re: strlcpy and how CPUs can defy common sense1Johanne Fairchild

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal