Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

"When anyone says `theoretically,' they really mean `not really.'" -- David Parnas


devel / comp.lang.c++ / "C and C++ Prioritize Performance over Correctness" by Russ Cox

SubjectAuthor
o "C and C++ Prioritize Performance over Correctness" by Russ CoxLynn McGuire

1
"C and C++ Prioritize Performance over Correctness" by Russ Cox

<uc0oqb$22vo2$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=1086&group=comp.lang.c%2B%2B#1086

  copy link   Newsgroups: comp.lang.c++ comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: lynnmcgu...@gmail.com (Lynn McGuire)
Newsgroups: comp.lang.c++,comp.lang.c
Subject: "C and C++ Prioritize Performance over Correctness" by Russ Cox
Date: Mon, 21 Aug 2023 17:34:51 -0500
Organization: A noiseless patient Spider
Lines: 31
Message-ID: <uc0oqb$22vo2$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 21 Aug 2023 22:34:51 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="f770290c290d6a2a9d633bcc93a3ecb4";
logging-data="2195202"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Xe6FtdmFfkkfaZxFgIBGznOD+kPXBeOc="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
Cancel-Lock: sha1:SyfKIgzuqiYGvTMLY7IKLCJeJL0=
Content-Language: en-US
 by: Lynn McGuire - Mon, 21 Aug 2023 22:34 UTC

"C and C++ Prioritize Performance over Correctness" by Russ Cox
https://research.swtch.com/ub

"The original ANSI C standard, C89, introduced the concept of “undefined
behavior,” which was used both to describe the effect of outright bugs
like accessing memory in a freed object and also to capture the fact
that existing implementations differed about handling certain aspects of
the language, including use of uninitialized values, signed integer
overflow, and null pointer handling."

"The C89 spec defined undefined behavior (in section 1.6) as:
Undefined behavior—behavior, upon use of a nonportable or erroneous
program construct, of erroneous data, or of indeterminately-valued
objects, for which the Standard imposes no requirements. Permissible
undefined behavior ranges from ignoring the situation completely with
unpredictable results, to behaving during translation or program
execution in a documented manner characteristic of the environment (with
or without the issuance of a diagnostic message), to terminating a
translation or execution (with the issuance of a diagnostic message)."

"Lumping both non-portable and buggy code into the same category was a
mistake. As time has gone on, the way compilers treat undefined behavior
has led to more and more unexpectedly broken programs, to the point
where it is becoming difficult to tell whether any program will compile
to the meaning in the original source. This post looks at a few examples
and then tries to make some general observations. In particular, today’s
C and C++ prioritize performance to the clear detriment of correctness."

In other news, water is wet.

Lynn


devel / comp.lang.c++ / "C and C++ Prioritize Performance over Correctness" by Russ Cox

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor