|
From: | Christian Jullien |
Subject: | Re: [Tinycc-devel] modern c++ compiler written in C (food for thought) |
Date: | Sun, 1 Nov 2015 10:49:02 +0100 |
Ooops, only the LAP compiler is two times slower while it should be two times faster. Generated C code where all optimization phases have been done by Lisp compiler, is only around 40% slower than gcc. In results below - ‘XX bits’ means interpreter - ‘Compile’ compiled to LAP then LAP is interpreted by a VM - ‘ LAPtoCC’ is the C backend with more hand written optimizations. When tcc compiles LAPtoCC it has nothing to optimize at all. It is there only to generate obj after Lisp compiler has already optimized intermediate code AND C backend has optimized generated C code. Basically, there are only assignments, tests followed possibility by goto and functions calls. Here, tcc is 40%slower than tcc. When it has more things to optimize like with the LAP interpreter (which is damn simple to compile), it is 10 times slower than gcc to vc++. Digital Mars 8.57 Win32 (32 bits) | 3.816 Digital Mars 8.57 Win32 (Compile) | 1.391 Digital Mars 8.57 Win32 (LAPtoCC) | 0.257 GNU GCC 5.x (Mgw) Win32 (32 bits) | 2.305 GNU GCC 5.x (Mgw) Win32 (Compile) | 1.091 GNU GCC 5.x (Mgw) Win32 (LAPtoCC) | 0.203 GNU GCC 5.x (Mgw) Win64 (64 bits) | 2.450 GNU GCC 5.x (Mgw) Win64 (Compile) | 1.561 GNU GCC 5.x (Mgw) Win64 (LAPtoCC) | 0.249 IBM Visual Age C Win32 (32 bits) | 2.892 IBM Visual Age C Win32 (Compile) | 1.563 LCC C Compiler Win32 (32 bits) | 3.896 LCC C Compiler Win32 (Compile) | 1.459 LCC C Compiler Win64 (64 bits) | 4.737 LCC C Compiler Win64 (Compile) | 1.817 Microsoft C 18.0 Win32 (32 bits) | 1.865 Microsoft C 18.0 Win32 (Compile) | 1.289 Microsoft C 18.0 Win32 (LAPtoCC) | 0.212 Microsoft C 18.0 Win32 (Unicode) | 1.942 Microsoft C 18.0 Win64 (64 bits) | 1.866 Microsoft C 18.0 Win64 (Compile) | 1.247 Microsoft C 18.0 Win64 (LAPtoCC) | 0.244 Microsoft C 18.0 Win64 (Unicode) | 2.124 Pelles C Compiler Win32 (32 bits) | 3.672 Pelles C Compiler Win64 (64 bits) | 4.085 Tiny C Compiler Win32 (32 bits) | 6.098 Tiny C Compiler Win32 (Compile) | 10.774 Tiny C Compiler Win32 (LAPtoCC) | 0.348 Tiny C Compiler Win64 (64 bits) | 6.123 Tiny C Compiler Win64 (Compile) | 10.818 Tiny C Compiler Win64 (LAPtoCC) | 0.377 Watcom C 1.90 Win32 (32 bits) | 2.798 Watcom C 1.90 Win32 (Compile) | 1.265 -----Original Message----- > What is "funny" with tinycc is that, due to the lack of optimization, > compiled code is twice as SLOW as interpreted code >2000 6.6 Lisp to LAP compiler. LAP is interpreted by a virtual machine embedded in OpenLisp. Speed improvement is about 2x. >2003 7.5 Lisp to C backend. It was able to compile an application with >many lisp files to a standalone executable. Speed improvement is from >10x to 20x Hard to trust. A tcc compiled program is 80x slower then a gcc compiled.. _______________________________________________ Tinycc-devel mailing list |
[Prev in Thread] | Current Thread | [Next in Thread] |