Path: csiph.com!weretis.net!feeder8.news.weretis.net!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: Beginner....Decimal/Octal converter help Date: Wed, 14 Sep 2022 07:54:53 -0700 Organization: None to speak of Lines: 32 Message-ID: <87sfkugg5e.fsf@nosuchdomain.example.com> References: <8ffd982c-2e82-4caa-9256-ec17be2efe56n@googlegroups.com> <8735cy0wt4.fsf@bsb.me.uk> <87r10hzn19.fsf@bsb.me.uk> <87mtb4wq4f.fsf@bsb.me.uk> <875yhswfiv.fsf@bsb.me.uk> <8735cvtryu.fsf@bsb.me.uk> <87tu5bs282.fsf@bsb.me.uk> <20220913131411.121@kylheku.com> <875yhrhs5o.fsf@nosuchdomain.example.com> <20220913224818.803@kylheku.com> MIME-Version: 1.0 Content-Type: text/plain Injection-Info: reader01.eternal-september.org; posting-host="8fc111422276ca8204b941f03dd9cf79"; logging-data="3161493"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/4K54RrcPM23vyDgt0W7hP" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) Cancel-Lock: sha1:6DQx2YSKDGVArAlxZEjqON2FSLM= sha1:dbcTp985QbLbNRWLe09VAwzBxyo= Xref: csiph.com comp.lang.c:167718 David Brown writes: [...] > In the context of other parts of code, it can be obvious that the > exact size is important - but it is usually only important in terms of > being a size that is big enough for your needs, and fits the target > well. That might sound exactly like a description of "uint_fast32_t", > but it is not. When you write "uint_fast32_t", you are telling the > reader "this code, and this variable, is speed critical" whether it is > true or not. It is a bit like declaring the variable "register" - the > compiler will ignore the hint (unless you try to take the variable's > address), but it tells human readers that you think the variable is > critical. I think "speed critical" is an overstatement. I'd say that uint_fast32_t means I need at least 32 bits, and performance is more important than small size. For example, if 64-bit operations are faster than 32-bit operations, I'd rather use 64 bits than 32 -- which is almost certainly the right choice if I'm only defining one object rather than a large array. It's may not have been the best decision to use the shorter names for the exact types. Perhaps if the types were called uint_exact32_t, uint_fast32_t, and uint_least32_t, more programmers would decide which one to use based on the actual characteristics of the types rather than the lengths of their names. [...] -- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com Working, but not speaking, for Philips void Void(void) { Void(); } /* The recursive call of the void */