Deutsch English Français Italiano |
<v309fk$3jrtv$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: bart <bc@freeuk.com> Newsgroups: comp.lang.c Subject: Re: C23 thoughts and opinions Date: Sun, 26 May 2024 22:27:15 +0100 Organization: A noiseless patient Spider Lines: 62 Message-ID: <v309fk$3jrtv$1@dont-email.me> References: <v2l828$18v7f$1@dont-email.me> <00297443-2fee-48d4-81a0-9ff6ae6481e4@gmail.com> <v2lji1$1bbcp$1@dont-email.me> <87msoh5uh6.fsf@nosuchdomain.example.com> <f08d2c9f-5c2e-495d-b0bd-3f71bd301432@gmail.com> <v2nbp4$1o9h6$1@dont-email.me> <v2ng4n$1p3o2$1@dont-email.me> <87y18047jk.fsf@nosuchdomain.example.com> <87msoe1xxo.fsf@nosuchdomain.example.com> <v2sh19$2rle2$2@dont-email.me> <87ikz11osy.fsf@nosuchdomain.example.com> <v2v59g$3cr0f$1@dont-email.me> <v2v7ni$3d70v$1@dont-email.me> <20240526161832.000012a6@yahoo.com> <v2vka0$3f4a2$1@dont-email.me> <20240526193549.000031a8@yahoo.com> <v2vtdi$3gnl6$1@dont-email.me> <20240526232651.00002d2e@yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sun, 26 May 2024 23:27:17 +0200 (CEST) Injection-Info: dont-email.me; posting-host="8e9185d4e0820a2f5b79db78e2103a30"; logging-data="3796927"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+uSA1OwJwSmLpZ2uqLzMFY" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:DmbGdR6ZyVwjFi5EpRECLiq92oA= Content-Language: en-GB In-Reply-To: <20240526232651.00002d2e@yahoo.com> Bytes: 3750 On 26/05/2024 21:26, Michael S wrote: > On Sun, 26 May 2024 19:01:21 +0100 > bart <bc@freeuk.com> wrote: > >> On 26/05/2024 17:35, Michael S wrote: >>> On Sun, 26 May 2024 16:25:51 +0100 >>> bart <bc@freeuk.com> wrote: >>> >>> >>>> >>>> Back to the 5MB test: >>>> >>>> Tiny C 1.7s 2.9MB/sec (Tcc doesn't use any IR) >>>> >>>> mcc 3.7s 1.3MB/sec (my product; uses intermediate >>>> ASM) >>> >>> Faster than new MSVC, but slower than old MSVC. >> >> My mcc is never going to be fast, because it uses ASM, which itself >> will generate a text file several times larger than the C (so the >> line "123," in C ends up as " db 123" in the ASM file). >> > > Generation of asm at 7-8 MB/s sounds feasible even on slow computer. > And once you have asm in right format, If I take the 5M-line data file, and use `gcc -S` on it, produces an ASM file where the bytes are combined into strings. Is that the 'trick'? Then processing that ASM file can be faster. However my ASM o/p doesn't create strings like that, and the ASM file is therefore five times the size. Still, my assembler can turn my 72MB ASM file into a 5MB executable in 0.74 seconds (which is 100MB/sec). 'as' can turn its much smaller 15MB ASM (.s) file into an executable in 0.56 seconds (27MB/sec). > 'gnu as' processes it quite fast. Given the same input (ie. same set of instructions), my assembler is faster than 'as'. See this survey of assembler speeds here: https://www.reddit.com/r/Compilers/comments/1c41y6d/assembler_survey/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button Mine is the 'AA' assembler. The bottleneck here is writing the ASM file. But I don't care about that, since 'mcc' is not my primary compiler. My primary one doesn't use ASM. But even with that bottleneck, mcc compiles this data file to EXE three times as fast as gcc. My MM compiler can do so 17 times as fast as gcc. And with the optimisation I mentioned in a previous post (similar to as's trick), it could do so 35-40 times faster than gcc.