# ATS and TCC

**URL:** <https://discourse.ats-lang.org/t/ats-and-tcc/47>\
**Category:** Google Group\
**Created:** [December 16, 2014, 7:52pm UTC](https://discourse.ats-lang.org/t/ats-and-tcc/47 "2014-12-16T19:52:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gmhwxi](https://avatars.discourse-cdn.com/v4/letter/g/67e7ee/32.png) [@gmhwxi](https://discourse.ats-lang.org/u/gmhwxi)\
**Post date:** [December 16, 2014, 7:52pm UTC](https://discourse.ats-lang.org/t/ats-and-tcc/47/1 "2014-12-16T19:52:17Z")

</div>

TCC ([http://bellard.org/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.

---

<div class="post-metadata">

**Author:** ![gmhwxi](https://avatars.discourse-cdn.com/v4/letter/g/67e7ee/32.png) [@gmhwxi](https://discourse.ats-lang.org/u/gmhwxi)\
**Post date:** [December 16, 2014, 9:05pm UTC](https://discourse.ats-lang.org/t/ats-and-tcc/47/2 "2014-12-16T21:05:33Z")

</div>

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.On Tuesday, December 16, 2014 2:55:04 PM UTC-5, Brandon Barker wrote:

> Is it being used in Travis CI, or would you even want to?
> 
> On Tue, Dec 16, 2014 at 2:52 PM, gmhwxi \<[gmh...@gmail.com](mailto:gmh...@gmail.com) \<javascript:\>\> wrote:
> 
> > TCC ([TCC : Tiny C Compiler](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.
> > 
> > –  
> > 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...@googlegroups.com](mailto:ats-lang...@googlegroups.com) \<javascript:\>.  
> > To post to this group, send email to [ats-l...@googlegroups.com](mailto:ats-l...@googlegroups.com)  
> > \<javascript:\>.  
> > Visit this group at [http://groups.google.com/group/ats-lang-users](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](https://groups.google.com/d/msgid/ats-lang-users/ca50127f-0385-426e-a1f7-ccfa974c4830%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/ats-lang-users/ca50127f-0385-426e-a1f7-ccfa974c4830%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/ats-lang-users/ca50127f-0385-426e-a1f7-ccfa974c4830%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .
> 
> –  
> Brandon Barker  
> [brand...@gmail.com](mailto:brand...@gmail.com) \<javascript:\>

---

<div class="post-metadata">

**Author:** ![gmhwxi](https://avatars.discourse-cdn.com/v4/letter/g/67e7ee/32.png) [@gmhwxi](https://discourse.ats-lang.org/u/gmhwxi)\
**Post date:** [December 16, 2014, 8:17pm UTC](https://discourse.ats-lang.org/t/ats-and-tcc/47/3 "2014-12-16T20:17:47Z")

</div>

Let’s hope that someone will soon give CompCert a try to see how  
it fares when used to bootstrap ATS2 :)On Tuesday, December 16, 2014 2:55:08 PM UTC-5, Raoul Duke wrote:

> the wrong answer fast (or slow) might not be so good 😉
> 
> [verified c compiler - Google Search](https://www.google.com/search?q=verified+c+compiler)

---

<div class="post-metadata">

**Author:** ![Brandon\_Barker](https://sea1.discourse-cdn.com/flex019/user_avatar/discourse.ats-lang.org/brandon_barker/32/61_2.png) [@Brandon\_Barker](https://discourse.ats-lang.org/u/Brandon_Barker)\
**Post date:** [December 16, 2014, 7:54pm UTC](https://discourse.ats-lang.org/t/ats-and-tcc/47/4 "2014-12-16T19:54:44Z")

</div>

Is it being used in Travis CI, or would you even want to?On Tue, Dec 16, 2014 at 2:52 PM, gmhwxi [gmh...@gmail.com](mailto:gmh...@gmail.com) wrote:

> TCC ([TCC : Tiny C Compiler](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.
> 
> –  
> 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](mailto:ats-lang-user...@googlegroups.com).  
> To post to this group, send email to [ats-lan...@googlegroups.com](mailto:ats-lan...@googlegroups.com).  
> Visit this group at [http://groups.google.com/group/ats-lang-users](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](https://groups.google.com/d/msgid/ats-lang-users/ca50127f-0385-426e-a1f7-ccfa974c4830%40googlegroups.com)  
> [https://groups.google.com/d/msgid/ats-lang-users/ca50127f-0385-426e-a1f7-ccfa974c4830%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/ats-lang-users/ca50127f-0385-426e-a1f7-ccfa974c4830%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .

Brandon Barker  
[brandon...@gmail.com](mailto:brandon...@gmail.com)

---

<div class="post-metadata">

**Author:** ![Raoul\_Duke](https://avatars.discourse-cdn.com/v4/letter/r/bbe5ce/32.png) [@Raoul\_Duke](https://discourse.ats-lang.org/u/Raoul_Duke)\
**Post date:** [December 16, 2014, 7:55pm UTC](https://discourse.ats-lang.org/t/ats-and-tcc/47/5 "2014-12-16T19:55:08Z")

</div>

the wrong answer fast (or slow) might not be so good 😉

[https://www.google.com/search?q=verified+c+compiler](https://www.google.com/search?q=verified+c+compiler)
