ATS and TCC

32 views
Skip to first unread message

gmhwxi

unread,
Dec 16, 2014, 2:52:17 PM12/16/14
to ats-lan...@googlegroups.com

TCC (http://bellard.org/tcc) is REALLY fast. When used to bootstrap ATS2,
it is more than 10 times faster than 'gcc -O2':

cd ${PATSHOME}/src/CBOOT
time make CC=tcc >& /dev/null

real    0m3.634s
user    0m2.280s
sys     0m0.744s

cd ${PATSHOME}/src/CBOOT
time make CC=gcc >& /dev/null

real    0m41.857s
user    0m34.334s
sys     0m3.900s

I obtained the above numbers on my pretty slow laptop.

I also noted that the compiler (patsopt) generated by TCC
takes about 3X the time needed by the one generated by GCC.


Brandon Barker

unread,
Dec 16, 2014, 2:55:04 PM12/16/14
to ats-lang-users
Is it being used in Travis CI, or would you even want to?

--
You received this message because you are subscribed to the Google Groups "ats-lang-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ats-lang-user...@googlegroups.com.
To post to this group, send email to ats-lan...@googlegroups.com.
Visit this group at http://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/ca50127f-0385-426e-a1f7-ccfa974c4830%40googlegroups.com.


--
Brandon Barker
brandon...@gmail.com

Raoul Duke

unread,
Dec 16, 2014, 2:55:08 PM12/16/14
to ats-lang-users
the wrong answer fast (or slow) might not be so good ;-)

https://www.google.com/search?q=verified+c+compiler

gmhwxi

unread,
Dec 16, 2014, 3:17:48 PM12/16/14
to ats-lan...@googlegroups.com

Let's hope that someone will soon give CompCert a try to see how
it fares when used to bootstrap ATS2 :)

gmhwxi

unread,
Dec 16, 2014, 4:05:34 PM12/16/14
to ats-lan...@googlegroups.com

TCC is not being used in the travis.yml script.

Given the nature of TCC, I prefer to use it when there is a problem with
gcc. It may be able to give me a clue or two as to whether the problem
is caused by patsopt or gcc.

On my old and slow laptop, TCC could handle in less than 2 seconds 500K
(half of a million) lines of C code generated by patsopt. If someone ever wants
to use ATS to do scripting, using TCC can make a lot of sense.
Reply all
Reply to author
Forward
0 new messages