[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] ASM Output?

From: Dave Dodge
Subject: Re: [Tinycc-devel] ASM Output?
Date: Thu, 18 Nov 2004 17:55:39 -0500
User-agent: Mutt/1.4.2i

On Thu, Nov 18, 2004 at 09:36:54AM +0000, Jim Peters wrote:
> I assume you've tried the code without the mapping, i.e. doing pure
> byte-by-byte input/output, to see if that is where the problem lies
> ... ?

Yes, I tried that last night in an off-list discussion and it shows
that the I/O is the problem.  I removed the conversion function and
all of the uint8_t operations, leaving just a simple getc/putc loop
with an int value.  On the P4 system in question the program still
took 8 seconds when compiled by gcc and 2 seconds when compiled by

That also explains why tcc _appeared_ to be generating much faster
code when the conversion function was originally a switch statement
instead of a lookup table.  gcc's I/O problem would have completely
overshadowed any benefit from its better switch implementation.

Why gcc's I/O is so crappy when tcc's is not, I have no idea.  Since
they're both linked against glibc I assume they're both using the same
_IO_getc and _IO_putc functions, and the main function doesn't need
to do much more than just call those and test the return values.

                                                  -Dave Dodge

reply via email to

[Prev in Thread] Current Thread [Next in Thread]