flat assembler
Message board for the users of flat assembler.

Index > Heap > Is there any way to make C compile as fast as FASM?

Author
Thread Post new topic Reply to topic
CampTheBoss



Joined: 02 Feb 2015
Posts: 42
Location: A chair
CampTheBoss
Hey, I'm doing some C programming right now and i want to see if i can make a C calculator compile as fast as one in FASM. Currently, with GCC I can compile it in 2 seconds (NetBeans IDE) but i want to see if i could make it compile at the FASM standard i have, which is 1.2 seconds
Post 30 Mar 2015, 18:28
View user's profile Send private message Send e-mail Reply with quote
HaHaAnonymous



Joined: 02 Dec 2012
Posts: 1180
Location: Unknown
HaHaAnonymous
Quote:

Is there any way to make C compile as fast as FASM?

I think it is impossible. Unless you have too many macros in FASM!?

The compiler has much more work to do than FASM (an assembler).

The compiler will have to parse many more things, perform complex optimizations, probably even more steps, and then finally (:D) assemble the generated file to generate the final executable (and I think this process alone would even take more time than FASM D:).

Plus GCC compilers are not known for fast compilation process.

Perhaps the linking stage (if any) will take more time than to assemble a file. As an example FASM takes only <100ms to compile on my system while NASM takes a whopping 25 SECONDS. What is that, more than 200 times slower!? D:

But I do not know how compilers work, it is all speculation. Hopefully, someone will give you a more decent answer. D:


Last edited by HaHaAnonymous on 30 Mar 2015, 19:34; edited 1 time in total
Post 30 Mar 2015, 19:20
View user's profile Send private message Reply with quote
CampTheBoss



Joined: 02 Feb 2015
Posts: 42
Location: A chair
CampTheBoss
yea your answer's pretty good. Do you know anything about other compilers for C which run faster?
Post 30 Mar 2015, 19:33
View user's profile Send private message Send e-mail Reply with quote
HaHaAnonymous



Joined: 02 Dec 2012
Posts: 1180
Location: Unknown
HaHaAnonymous
Quote:

Do you know anything about other compilers for C which run faster?

No, sorry. But I am think there are some.
Post 30 Mar 2015, 19:56
View user's profile Send private message Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3500
Location: Bulgaria
JohnFound
The Borland series of compiler Turbo Pascal and Turbo C was known for their fast compilation. I happened to write millions lines of code using Turbo Pascal and can say it compiled very very fast. Of course I didn't ever make benchmarks, but the feeling was exactly as in FASM - click-1..2seconds- done. Smile Also, the later Borland products - Delphi and C++Builder was much more faster than MS compilers. Although, I don't know what is the speed of the later versions of these compilers. (Now they are developed by Embarcadero Technologies.
Post 30 Mar 2015, 20:51
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
CampTheBoss



Joined: 02 Feb 2015
Posts: 42
Location: A chair
CampTheBoss
cool, does Borland Turbo C support win32? because i only see MS-DOS downloads
Post 30 Mar 2015, 21:25
View user's profile Send private message Send e-mail Reply with quote
gens



Joined: 18 Feb 2013
Posts: 161
gens
TCC is pretty fast

well, even CLANG is generally faster then gcc
Post 30 Mar 2015, 21:25
View user's profile Send private message Reply with quote
TmX



Joined: 02 Mar 2006
Posts: 821
Location: Jakarta, Indonesia
TmX
CampTheBoss wrote:
cool, does Borland Turbo C support win32? because i only see MS-DOS downloads


Try Turbo Explorer.
It's freeware.
Unfortunately, Borland already removedi it from its download page, so better trying to find it at torrent sites.
Post 31 Mar 2015, 01:35
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17247
Location: In your JS exploiting you and your system
revolution
CampTheBoss wrote:
Is there any way to make C compile as fast as FASM?
Yes there is. Write smaller program in C and larger programs in assembly. Wink
Post 31 Mar 2015, 01:47
View user's profile Send private message Visit poster's website Reply with quote
Matrix



Joined: 04 Sep 2004
Posts: 1171
Location: Overflow
Matrix
CampTheBoss wrote:
Hey, I'm doing some C programming right now and i want to see if i can make a C calculator compile as fast as one in FASM. Currently, with GCC I can compile it in 2 seconds (NetBeans IDE) but i want to see if i could make it compile at the FASM standard i have, which is 1.2 seconds


C is higher level language than ASM, so it is not possible, the only way to make it compile in less time is to speed up your computer in any way.
Post 01 Apr 2015, 07:52
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.