Re: Interval Comparisons

Liste des GroupesRevenir à l c 
Sujet : Re: Interval Comparisons
De : bc (at) *nospam* freeuk.com (bart)
Groupes : comp.lang.c
Date : 04. Jun 2024, 17:54:33
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v3ngs9$gksq$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9
User-Agent : Mozilla Thunderbird
On 04/06/2024 17:25, Michael S wrote:
On Tue, 4 Jun 2024 16:58:43 +0100
bart <bc@freeuk.com> wrote:
 
On 04/06/2024 16:27, Scott Lurndal wrote:
David Brown <david.brown@hesbynett.no> writes:
On 04/06/2024 13:23, bart wrote:
  
It is incredibly useful:
>
      if c in [' ', '\t', '\n'] then ... # whitespace
>
if (strpbrk(c, " \t\n") != NULL) it_is_whitespace.
>
That doesn't do the same thing. In my example, c is a character, not
a string.
>
  Will that be be better?
if (memchr(" \t\n", c, 3) != NULL)
 
It's a better match. But on gcc-O3, it still calls the library function up to version 12.x. After that, it's smart enough to generate similar code to my non-optimising compiler using the built-in feature.
It is also still limited to byte values.
My approach is to fix a language, which is easier, than to expend magnitudes more effort in elaborate tools and ultra-smart compilers.

Date Sujet#  Auteur
4 Jun 24 * Interval Comparisons44Lawrence D'Oliveiro
4 Jun 24 +* Re: Interval Comparisons14David Brown
4 Jun 24 i`* Re: Interval Comparisons13Mikko
4 Jun 24 i +* Re: Interval Comparisons10David Brown
4 Jun 24 i i+* Re: Interval Comparisons8bart
4 Jun 24 i ii+* Re: Interval Comparisons6David Brown
4 Jun 24 i iii+* Re: Interval Comparisons2bart
4 Jun 24 i iiii`- Re: Interval Comparisons1David Brown
4 Jun 24 i iii`* Re: Interval Comparisons3bart
4 Jun 24 i iii `* Re: Interval Comparisons2Michael S
4 Jun 24 i iii  `- Re: Interval Comparisons1bart
5 Jun 24 i ii`- Re: Interval Comparisons1Lawrence D'Oliveiro
4 Jun 24 i i`- Re: Interval Comparisons1Mikko
4 Jun 24 i +- Re: Interval Comparisons1Janis Papanagnou
4 Jun 24 i `- Re: Interval Comparisons1Keith Thompson
4 Jun 24 +- Re: Interval Comparisons1bart
4 Jun 24 +* Re: Interval Comparisons3Thiago Adams
4 Jun 24 i+- Re: Interval Comparisons1Bonita Montero
4 Jun 24 i`- Re: Interval Comparisons1Keith Thompson
4 Jun 24 `- Re: Interval Comparisons25Blue-Maned_Hawk

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal