Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: BGB Newsgroups: comp.lang.c Subject: Re: C23 thoughts and opinions Date: Fri, 7 Jun 2024 02:52:56 -0500 Organization: A noiseless patient Spider Lines: 20 Message-ID: References: <20240602110213.00003b25@yahoo.com> <20240602162914.0000648c@yahoo.com> <20240603120043.00003511@yahoo.com> <20240603225856.0000679d@yahoo.com> <3uq7O.9130$nd%8.1870@fx45.iad> <20240603221239.245@kylheku.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Fri, 07 Jun 2024 09:54:08 +0200 (CEST) Injection-Info: dont-email.me; posting-host="bcd181c8a8249ff7c60382eea8a36cf2"; logging-data="2092630"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18UreNBUPSlWOwOG2sqm6El2e8Avkr0hLg=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:B5i6qYCS1BaMTD19IQJZdsYohn8= Content-Language: en-US In-Reply-To: Bytes: 2439 On 6/6/2024 7:57 PM, Lawrence D'Oliveiro wrote: > On Wed, 5 Jun 2024 04:01:28 -0500, BGB wrote: > >> For my bounds-checking in C, there are no syntactic changes to C. > > But how efficient is it? Those research papers I mentioned reported being > able to get the execution overhead in Pascal down to something like 5-10%. Also somewhere around a 10% slowdown in this case, but this was with dedicated ISA level support and various specialized helper instructions (to check/set/adjust the pointer bounds bits). If it were done purely in software using "fat pointers" or similar, likely the overhead would be significantly higher than this. It seems sensible for debugging or for code that represents an attack surface (such as possible network-facing code), but granted, probably not ideal for performance sensitive code.