tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] Re: Any hope for small c++ compiler


From: Karel Gardas
Subject: Re: [Tinycc-devel] Re: Any hope for small c++ compiler
Date: Thu, 12 Dec 2002 08:26:37 +0100 (CET)

On Thu, 12 Dec 2002, Mitchell N Charity wrote:

>    Any hope for small c++ compiler
>
> No.  By definition, because C++ is not a small language.
>
>    Is it better to go for a cfront type precompiler and run that through
>    tcc or just implement a native tc++ compiler from scratch?
>
> Complexity and performance are similar.  Non-trivial C++ to C
> conversion requires a C++ compiler, which just happens to emit C code
> rather than object code.  Be advised, writing a C++ compiler is much
> harder than writing a C compiler, and is a _many_ person year project.
> Having tcc... helps you very little.
>
> I know of no open source C++ to C translators.  Comeau has a commercial
> one.  I have no idea how fast it is.  It is picky about its C compiler
> back ends, so using tcc would require effort. http://www.comeaucomputing.com

I do have one Comeau and I'm using it with gcc2.95.4 backend. I've tried
to use tcc for this, but w/o success - vide my previous email describing
problem with struct redefinition - this code is simplified code what
comeau generates. (now I've looked into tinycc-archive and doesn't find my
emails there, I'll try to resend it again)

With regarding to speed. The compiler is real ISO C++ and so I was curious
how fast it's be whan I purchase it. In fact it's something between
gcc2.95.4 and gcc3.2.1 while compiling our c++ project
(http://www.mico.org) Timing for strip down build was:

gcc2.95.4:    12m
como4.3.0.1:  16m
gcc3.2.1:     24m

When I optimized sources for use with precompiled headers, then I was able
to get some additional speed from it:

como4.3.0.1 + PCH:  11m

Interesting point here is that on some sources, compilation of generated C
source takes nearly the same time as compilation of C++, so I'll really
benefit something when tcc support this compiler well.

Cheers,

Karel
--
Karel Gardas                  address@hidden
ObjectSecurity Ltd.           http://www.objectsecurity.com




reply via email to

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