Re: Top 10 most common hard skills listed on resumes...

Liste des GroupesRevenir à cl c  
Sujet : Re: Top 10 most common hard skills listed on resumes...
De : david.brown (at) *nospam* hesbynett.no (David Brown)
Groupes : comp.lang.c
Date : 10. Sep 2024, 09:04:47
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vbor2f$2qqt1$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0
On 10/09/2024 00:04, Waldek Hebisch wrote:
David Brown <david.brown@hesbynett.no> wrote:
On 09/09/2024 18:46, Waldek Hebisch wrote:
David Brown <david.brown@hesbynett.no> wrote:
On 09/09/2024 05:04, Waldek Hebisch wrote:
Bart <bc@freeuk.com> wrote:
On 09/09/2024 01:29, Waldek Hebisch wrote:
Bart <bc@freeuk.com> wrote:
>
No.  It is essential for efficiency to have 32-bit types.  On 32-bit
machines doing otherwise would add useless instructions to object
code.  More precisly, really stupid compiler will generate useless
intructions even with my declarations, really smart one will
notice that variables fit in 32-bits and optimize accordingly.
But at least some gcc versions needed such declarations.  Note
also that my version makes clear that there there is
symmetry (everything should be added using 64-bit precision),
you depend on promotion rules which creates visual asymetry
are requires reasoning to realize that meaning is symetric.
>
Your posted code used 64-bit aritmetic. The xext and c 32-bit variables
were used in loops where they need to be widened to 64 bits anyway. The
new value of c is set from a 32-bit result.
>
Well, at C level there is 64-bit type.  The intent is that C compiler
should notice that the result is 32-bit + carry flag.  Ideally
compiler should notice that c has only one bit and can keep it
in carry flag.  On i386 comparison needed for loop control would
destroy carry flag, so there must be code using value of carry in
register and code to save carry to register.  But one addition
of highs parts can be skipped.  On 32-bit ARM compiler can use
special machine istructions and actually generated code which
is close to optimal.
>
When you have a type that you want to be at least 32 bits (to cover the
range you need), and want it to be as efficient as possible on 32-bit
and 64-bit machines (and 16-bit and 8-bit, still found in
microcontrollers), use "int_fast32_t".  On x86-64 it will be 64-bit, on
32-bit systems it will be 32-bit.  Use of the [u]int_fastNN_t types can
make code significantly more efficient on 64-bit systems while retaining
efficiency on 32-bit (or even smaller) targets.
>
Well, I have constraints, some of which are outside of C code.
To resolve contraints I normally use some configure machinery.
If a standard type is exact match for my constraints, then I would
use standard type, possibly adding some fallbacks for pre-standard
systems.  But if my constranits differ, I see no advantage in
using more "fancy" standard types compared to old types.
>
>
The "fancy" standard types in this case specify /exactly/ what you
apparently want - a type that can deal with at least 32 bits for range,
and is as efficient as possible on different targets.  What other
constraints do you have here that make "int_fast32_t" unsuitable?
 This routine is part of small library.  Good approximation is that
I want a type (posibly depending on target) which will make this
library fast.  As I wrote in another message I plan to use 64-bit
units of work on 64-bit targets.  I have not plans to use the
library in 8-bit or 16-bit targets, but if I needed them on such
targets I probably would use 16-bit work unit.  So, while 32-bit
work unit represents current state, it not correct statement of
intentions.  Consequently, 'int_fast32_t' would be as misleading
or more misleading than 'int' ('int' is reasonable indication
that choice of types is not finished, 'int_fast32_t' suggest that
it is proper choice for all targets).
So you really want to say "at least 16 bits, as efficiently as possible" - the type then is "int_fast16_t".  This should be 32-bit or 64-bit on most architectures bigger than 16-bit - unless the target is actually more efficient at handling 16-bit (such as the original 68000).
If something like that is not sufficient, because you want more flexibility, then consider making a typedef with a name you find suitable, and a using that.  You can have pre-processor conditional compilation to handle known cases, and fall back to int_fast16_t otherwise.
The answer to "I don't know if this is the best choice on all targets, including ones I haven't tried" is /not/ "I'll use this type that I know is not the most efficient on targets that I /have/ tried".

 
Concerning '<stdint.h>', somewhat worring thing is that several types
there seem to be optional (or maybe where optional in older versions
of the standard).  I am not sure if this can be real problem,
but too many times I saw that on various issues developers say
"this in not mandatory, so we will skip it".
>
>
<stdint.h> has been required since C99.  It has not been optional in any
C standard in the last 25 years.  That's a /long/ time - long enough for
most people to be able to say "it's standard".
>
And almost every C90 compiler also includes <stdint.h> as an extension.
>
If you manage to find a compiler that is old enough not to have
<stdint.h>, and you need to use it for actual code, it's probably worth
spending the 3 minutes it takes to write a suitable <stdint.h> yourself
for that target.
 ATM I do not have standard text handy to check, but AFAIR several
_types_ in <stdint.h> were not required but optional.
 
Online versions of the standards - at least from C99 upwards - are easily and freely available, as long as you are happy with the final pre-published drafts rather than insisting on the expensive official documents:
<https://en.cppreference.com/w/c/links>
Or you can ask here, and be sure that someone will tell you the answer. And if that answer is incorrect or imprecise, someone else will correct it :-)
The exact size types - int8_t, uint16_t, etc., might not exist on a given target (some DSP's have CHARBIT 16 or 32, for example).  The exact width types for sizes 8, 16, 32, and 64 are required if the implementation has standard or extended integer types of those sizes and properties (no padding bits, two's complement representation). Otherwise they are optional.  Other sizes are always optional - if an implementation has 24-bit int, it still does not have to provide int24_t, though it is good practice.
So the 8, 16, 32, and 64 exact size types are always available if the target supports them, and that is /almost/ always the case.
The [u]int_leastN_t and [u]int_fastN_t types are always required for 8, 16, 32 and 64 bit.  Other sizes are optional.
[u]intptr_t are optional, but almost always provided.  [u]intmax_t are required.
So you can freely use the "least" and "fast" types for sizes 8, 16, 32, and 64 on any platform, knowing they always exist (for C99 upwards). The fixed size types (for these standard sizes) will exist on all but the most unusual of C targets, and if you are working with such a target, you would already know about it.
If you need to convert a pointer to an integer type, use "uintptr_t" - if that type does not exist, you are probably on a specialist target that has some kind of long pointer and the conversion to an integer is unlikely to work well anyway.
(It is conceivable that a pre-C99 implementation will provide a partial <stdint.h> with the fixed size types and not the least or fast types.)

Date Sujet#  Auteur
24 Aug 24 * Top 10 most common hard skills listed on resumes...406John Forkosh
24 Aug 24 +* Re: Top 10 most common hard skills listed on resumes...3Lawrence D'Oliveiro
24 Aug 24 i`* Re: Top 10 most common hard skills listed on resumes...2Keith Thompson
24 Aug 24 i `- Re: Top 10 most common hard skills listed on resumes...1Lawrence D'Oliveiro
24 Aug 24 +* Re: Top 10 most common hard skills listed on resumes...8David Brown
25 Aug 24 i`* Re: Top 10 most common hard skills listed on resumes...7John Forkosh
25 Aug 24 i +- Re: Top 10 most common hard skills listed on resumes...1Michael S
25 Aug 24 i +* Re: Top 10 most common hard skills listed on resumes...3James Kuyper
25 Aug 24 i i+- Re: Top 10 most common hard skills listed on resumes...1Michael S
26 Aug 24 i i`- Re: Top 10 most common hard skills listed on resumes...1Vir Campestris
25 Aug 24 i `* Re: Top 10 most common hard skills listed on resumes...2David Brown
25 Aug 24 i  `- Re: Top 10 most common hard skills listed on resumes...1Chris M. Thomasson
24 Aug 24 `* Re: Top 10 most common hard skills listed on resumes...394Bonita Montero
24 Aug 24  `* Re: Top 10 most common hard skills listed on resumes...393Bart
24 Aug 24   +* Re: Top 10 most common hard skills listed on resumes...2Vir Campestris
24 Aug 24   i`- Re: Top 10 most common hard skills listed on resumes...1Thiago Adams
25 Aug 24   +* Re: Top 10 most common hard skills listed on resumes...359John Forkosh
25 Aug 24   i+* Re: Top 10 most common hard skills listed on resumes...356James Kuyper
25 Aug 24   ii+* Re: Top 10 most common hard skills listed on resumes...271fir
25 Aug 24   iii+* Re: Top 10 most common hard skills listed on resumes...269Bart
25 Aug 24   iiii+* Re: Top 10 most common hard skills listed on resumes...2Michael S
25 Aug 24   iiiii`- Re: Top 10 most common hard skills listed on resumes...1Bart
25 Aug 24   iiii+* Re: Top 10 most common hard skills listed on resumes...7tTh
25 Aug 24   iiiii`* Re: Top 10 most common hard skills listed on resumes...6Bart
28 Aug 24   iiiii `* Re: Top 10 most common hard skills listed on resumes...5Michael S
28 Aug 24   iiiii  +- Re: Top 10 most common hard skills listed on resumes...1Bonita Montero
28 Aug 24   iiiii  +* Re: Top 10 most common hard skills listed on resumes...2Bart
29 Aug 24   iiiii  i`- Re: Top 10 most common hard skills listed on resumes...1David Brown
30 Aug 24   iiiii  `- Re: Top 10 most common hard skills listed on resumes...1Lawrence D'Oliveiro
26 Aug 24   iiii`* Re: Top 10 most common hard skills listed on resumes...259Lawrence D'Oliveiro
26 Aug 24   iiii `* Re: Top 10 most common hard skills listed on resumes...258Bart
26 Aug 24   iiii  +* Re: Top 10 most common hard skills listed on resumes...256Ben Bacarisse
26 Aug 24   iiii  i+* Re: Top 10 most common hard skills listed on resumes...244Bart
26 Aug 24   iiii  ii+* Re: Top 10 most common hard skills listed on resumes...2Keith Thompson
26 Aug 24   iiii  iii`- Re: Top 10 most common hard skills listed on resumes...1Tim Rentsch
28 Aug 24   iiii  ii`* Re: Top 10 most common hard skills listed on resumes...241Ben Bacarisse
28 Aug 24   iiii  ii `* Re: Top 10 most common hard skills listed on resumes...240Bart
28 Aug 24   iiii  ii  `* Re: Top 10 most common hard skills listed on resumes...239Ben Bacarisse
28 Aug 24   iiii  ii   `* Re: Top 10 most common hard skills listed on resumes...238Bart
29 Aug 24   iiii  ii    +* Re: Top 10 most common hard skills listed on resumes...236Ben Bacarisse
29 Aug 24   iiii  ii    i`* Re: Top 10 most common hard skills listed on resumes...235Bart
29 Aug 24   iiii  ii    i `* Re: Top 10 most common hard skills listed on resumes...234Ben Bacarisse
29 Aug 24   iiii  ii    i  `* Re: Top 10 most common hard skills listed on resumes...233Bart
29 Aug 24   iiii  ii    i   `* Re: Top 10 most common hard skills listed on resumes...232Ben Bacarisse
29 Aug 24   iiii  ii    i    `* Re: Top 10 most common hard skills listed on resumes...231Kaz Kylheku
29 Aug 24   iiii  ii    i     `* Re: Top 10 most common hard skills listed on resumes...230Ben Bacarisse
29 Aug 24   iiii  ii    i      `* Re: Top 10 most common hard skills listed on resumes...229Kaz Kylheku
29 Aug 24   iiii  ii    i       +* Re: Top 10 most common hard skills listed on resumes...227Ben Bacarisse
29 Aug 24   iiii  ii    i       i+* Re: Top 10 most common hard skills listed on resumes...218Bart
29 Aug 24   iiii  ii    i       ii+* Re: Top 10 most common hard skills listed on resumes...5Keith Thompson
29 Aug 24   iiii  ii    i       iii`* Re: Top 10 most common hard skills listed on resumes...4Bart
30 Aug 24   iiii  ii    i       iii `* Re: Top 10 most common hard skills listed on resumes...3Keith Thompson
30 Aug 24   iiii  ii    i       iii  `* Re: Top 10 most common hard skills listed on resumes...2Bart
30 Aug 24   iiii  ii    i       iii   `- Re: Top 10 most common hard skills listed on resumes...1Keith Thompson
30 Aug 24   iiii  ii    i       ii+* Re: Top 10 most common hard skills listed on resumes...56Ben Bacarisse
30 Aug 24   iiii  ii    i       iii`* Re: Top 10 most common hard skills listed on resumes...55Kaz Kylheku
30 Aug 24   iiii  ii    i       iii +* Re: Top 10 most common hard skills listed on resumes...42Tim Rentsch
30 Aug 24   iiii  ii    i       iii i`* Re: Top 10 most common hard skills listed on resumes...41Keith Thompson
31 Aug 24   iiii  ii    i       iii i +* Re: Top 10 most common hard skills listed on resumes...10Kaz Kylheku
31 Aug 24   iiii  ii    i       iii i i+* Re: Top 10 most common hard skills listed on resumes...2James Kuyper
31 Aug 24   iiii  ii    i       iii i ii`- Re: Top 10 most common hard skills listed on resumes...1Keith Thompson
1 Sep 24   iiii  ii    i       iii i i`* Re: Top 10 most common hard skills listed on resumes...7Tim Rentsch
1 Sep 24   iiii  ii    i       iii i i `* Re: Top 10 most common hard skills listed on resumes...6Keith Thompson
1 Sep 24   iiii  ii    i       iii i i  +* Re: Top 10 most common hard skills listed on resumes...4Kaz Kylheku
1 Sep 24   iiii  ii    i       iii i i  i+* Re: Top 10 most common hard skills listed on resumes...2James Kuyper
1 Sep 24   iiii  ii    i       iii i i  ii`- Re: Top 10 most common hard skills listed on resumes...1Tim Rentsch
1 Sep 24   iiii  ii    i       iii i i  i`- Re: Top 10 most common hard skills listed on resumes...1Tim Rentsch
1 Sep 24   iiii  ii    i       iii i i  `- Re: Top 10 most common hard skills listed on resumes...1Tim Rentsch
31 Aug 24   iiii  ii    i       iii i `* Re: Top 10 most common hard skills listed on resumes...30Bart
31 Aug 24   iiii  ii    i       iii i  +- Re: Top 10 most common hard skills listed on resumes...1Kaz Kylheku
31 Aug 24   iiii  ii    i       iii i  +- Re: Top 10 most common hard skills listed on resumes...1James Kuyper
1 Sep 24   iiii  ii    i       iii i  +* Re: Top 10 most common hard skills listed on resumes...3Tim Rentsch
1 Sep 24   iiii  ii    i       iii i  i`* Re: Top 10 most common hard skills listed on resumes...2Bart
1 Sep 24   iiii  ii    i       iii i  i `- Re: Top 10 most common hard skills listed on resumes...1Tim Rentsch
1 Sep 24   iiii  ii    i       iii i  `* Re: Top 10 most common hard skills listed on resumes...24Keith Thompson
1 Sep 24   iiii  ii    i       iii i   `* Re: Top 10 most common hard skills listed on resumes...23Bart
1 Sep 24   iiii  ii    i       iii i    +* Re: Top 10 most common hard skills listed on resumes...3Keith Thompson
1 Sep 24   iiii  ii    i       iii i    i`* Re: Top 10 most common hard skills listed on resumes...2Tim Rentsch
1 Sep 24   iiii  ii    i       iii i    i `- Re: Top 10 most common hard skills listed on resumes...1Keith Thompson
1 Sep 24   iiii  ii    i       iii i    +* Re: Top 10 most common hard skills listed on resumes...17Kaz Kylheku
1 Sep 24   iiii  ii    i       iii i    i`* Re: Top 10 most common hard skills listed on resumes...16Tim Rentsch
8 Sep 24   iiii  ii    i       iii i    i `* Re: Top 10 most common hard skills listed on resumes...15Janis Papanagnou
8 Sep 24   iiii  ii    i       iii i    i  +* Re: Top 10 most common hard skills listed on resumes...10James Kuyper
8 Sep 24   iiii  ii    i       iii i    i  i`* Re: Top 10 most common hard skills listed on resumes...9Janis Papanagnou
9 Sep 24   iiii  ii    i       iii i    i  i +* Re: Top 10 most common hard skills listed on resumes...5David Brown
9 Sep 24   iiii  ii    i       iii i    i  i i`* Re: Top 10 most common hard skills listed on resumes...4James Kuyper
9 Sep 24   iiii  ii    i       iii i    i  i i `* Re: Top 10 most common hard skills listed on resumes...3David Brown
9 Sep 24   iiii  ii    i       iii i    i  i i  `* Re: Top 10 most common hard skills listed on resumes...2James Kuyper
17 Sep14:46   iiii  ii    i       iii i    i  i i   `- Re: Top 10 most common hard skills listed on resumes...1Tim Rentsch
9 Sep 24   iiii  ii    i       iii i    i  i `* Re: Top 10 most common hard skills listed on resumes...3Kaz Kylheku
9 Sep 24   iiii  ii    i       iii i    i  i  +- Re: Top 10 most common hard skills listed on resumes...1James Kuyper
17 Sep14:56   iiii  ii    i       iii i    i  i  `- Re: Top 10 most common hard skills listed on resumes...1Tim Rentsch
17 Sep15:57   iiii  ii    i       iii i    i  `* Re: Top 10 most common hard skills listed on resumes...4Tim Rentsch
17 Sep19:02   iiii  ii    i       iii i    i   `* Re: Top 10 most common hard skills listed on resumes...3Janis Papanagnou
18 Sep01:26   iiii  ii    i       iii i    i    `* Re: Top 10 most common hard skills listed on resumes...2Tim Rentsch
18 Sep17:28   iiii  ii    i       iii i    i     `- Re: Top 10 most common hard skills listed on resumes...1antispam
1 Sep 24   iiii  ii    i       iii i    +- Re: Top 10 most common hard skills listed on resumes...1James Kuyper
7 Sep 24   iiii  ii    i       iii i    `- Re: Top 10 most common hard skills listed on resumes...1Waldek Hebisch
2 Sep 24   iiii  ii    i       iii `* Re: Top 10 most common hard skills listed on resumes...12Ben Bacarisse
2 Sep 24   iiii  ii    i       iii  `* Re: Top 10 most common hard skills listed on resumes...11Bart
2 Sep 24   iiii  ii    i       iii   `* Re: Top 10 most common hard skills listed on resumes...10Ben Bacarisse
30 Aug 24   iiii  ii    i       ii+- Re: Top 10 most common hard skills listed on resumes...1Tim Rentsch
5 Sep 24   iiii  ii    i       ii`* Re: Top 10 most common hard skills listed on resumes...155Waldek Hebisch
29 Aug 24   iiii  ii    i       i`* Re: Top 10 most common hard skills listed on resumes...8James Kuyper
30 Aug 24   iiii  ii    i       `- Re: Top 10 most common hard skills listed on resumes...1Tim Rentsch
29 Aug 24   iiii  ii    `- Re: Top 10 most common hard skills listed on resumes...1Michael S
26 Aug 24   iiii  i`* Re: Top 10 most common hard skills listed on resumes...11Keith Thompson
26 Aug 24   iiii  `- Re: Top 10 most common hard skills listed on resumes...1Lawrence D'Oliveiro
26 Aug 24   iii`- Re: Top 10 most common hard skills listed on resumes...1Lawrence D'Oliveiro
25 Aug 24   ii+* Re: Top 10 most common hard skills listed on resumes...83Bonita Montero
25 Aug 24   ii`- Re: Top 10 most common hard skills listed on resumes...1Janis Papanagnou
25 Aug 24   i+- Re: Top 10 most common hard skills listed on resumes...1Bonita Montero
25 Aug 24   i`- Re: Top 10 most common hard skills listed on resumes...1David Brown
25 Aug 24   `* Re: Top 10 most common hard skills listed on resumes...31Janis Papanagnou

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal