Sujet : Re: Baby X is bor nagain
De : bc (at) *nospam* freeuk.com (bart)
Groupes : comp.lang.cDate : 12. Jun 2024, 14:13:24
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v4c6tj$1lg7d$1@dont-email.me>
References : 1 2 3 4 5 6 7
User-Agent : Mozilla Thunderbird
On 12/06/2024 13:35, Bonita Montero wrote:
Am 12.06.2024 um 13:27 schrieb bart:
I suggested using a string representation. While the generated text
file is not much smaller, it is seen by the compiler as one string expression, instead of millions of small expressions. Or at least, 1/20th the number if you split the strings across lines.
I implemented that with my second code but the compilers are still
limited with that.
What size of file are we talking about, and how much memory in your machine?
I need another test with a 55MB test file. These are the results:
{65,66,67,... "\x41\x42\x43...
g++ 284 seconds 13 seconds
tcc 20 seconds 2.5 seconds
A 20x slowdown suggests problems exceeding memory.
Do you have a test file that does work in either format? If so how much difference was there between them? If very little, then you're doing something wrong.
(I did one more test with my language which directly imported the 55MB binary without either of those intermediate textual formats. It took under 0.7 seconds.
That needs built-in language support, but using a more apt textual format is a sensible first step.)