Re: Baby X is bor nagain

Liste des GroupesRevenir à cl c  
Sujet : Re: Baby X is bor nagain
De : bc (at) *nospam* freeuk.com (bart)
Groupes : comp.lang.c
Date : 18. Jun 2024, 17:38:58
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v4sd71$1e631$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
User-Agent : Mozilla Thunderbird
On 18/06/2024 17:11, David Brown wrote:
On 18/06/2024 15:48, bart wrote:

I haven't tried it directly in C (I don't have a C 'readfile's to hand); I tried it in my language on a 100MB test input of 15M random numbers ranging up to one million.
 No one is interested in that - that was not part of the task.
You're arguing in favour of a high level scripting language for task rather than a lower level one which you claim involves a lot of 'faffing' around.
I tried it using mine (C would have taken 10 minutes longer), and found it wasn't actually that hard, especially if you have some ready-made routines lying around.
Plus it was a magnitude faster. Plus I showed how it could be run without a discrete build step just like Python (Tcc has that feature for C).
So for this example, there wasn't a lot in it, while the low-level could was shown to be faster without trying too hard.
For a throwaway program that is only run once you probably would use the nearest scripting language; its extra runtime (5 seconds for my example) is shorter than the next extra coding time.
But that's not why you might use C.

>
With a more arbitrary input format, this would be the kind of job that a compiler's lexer does. But nobody seriously writes lexers in Python.
 Yes, people do.  (Look up the PLY project, for example.)  Nobody seriously writes lexers in C these days.  They use Python or another high level language during development, prototyping and experimentation, and if the language takes off as a realistic general-purpose language, they either write the lexer and the rest of the tools in the new language itself, or they use C++.
I'm not talking about experimentation.
Actually I'm starting to wonder whether you use C much at all, and why.
You come across as a Python and C++ 'fan-boy'.

Date Sujet#  Auteur
11 Jun 24 o Re: Baby X is bor nagain319Bonita Montero

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal