Deutsch   English   Français   Italiano  
<87ed6x7868.fsf@nosuchdomain.example.com>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Keith Thompson <Keith.S.Thompson+u@gmail.com>
Newsgroups: comp.lang.c
Subject: Re: how cast works?
Date: Fri, 09 Aug 2024 13:28:15 -0700
Organization: None to speak of
Lines: 14
Message-ID: <87ed6x7868.fsf@nosuchdomain.example.com>
References: <v8vlo9$2oc1v$1@dont-email.me> <slrnvb7kis.28a.dan@djph.net>
	<v929ah$3u7l7$1@dont-email.me>
	<87ttfu94yv.fsf@nosuchdomain.example.com>
	<v93a3t$6q7v$1@dont-email.me> <v93e2q$8put$1@dont-email.me>
	<v94smd$mgp8$1@dont-email.me> <v95j4r$qh1q$3@dont-email.me>
	<v95okr$2oa92$1@dont-email.me> <v95p9h$2oa92$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Date: Fri, 09 Aug 2024 22:28:16 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="153d1bcdb0929153f62e0b2f2aa4005b";
	logging-data="2596224"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+5C/C66tsDQ4liAvbfjfFy"
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:ow69nn2mKe0CkaFzsmnkR3Dv5os=
	sha1:D8ePDxlDxHEE0/ODg+0PD7TM0bk=
Bytes: 1776

Thiago Adams <thiago.adams@gmail.com> writes:
[...]
> and I am still curious if _Bool/bool makes the programs slower (more
> instructions) compared with
> "typedef int bool" because the generated code has to convert bool->int
> int->bool all the time.

Maybe.  The only way to answer that would be perform measurements.
And you'll have to be careful to ensure that the operations aren't
optimized away.  Writing useful benchmarks can be tricky.

-- 
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */