flat assembler
Message board for the users of flat assembler.

Index > Programming Language Design > FASM/G Build Performance - I Surmise not an Issue

Author
Thread Post new topic Reply to topic
Greg_M



Joined: 07 Jun 2025
Posts: 53
Greg_M 30 Dec 2025, 19:32
The flexibility of FASM/G allows using it to create new compiling/assembling solutions that are effectively pre-processed such that concern about FASM/G build times is a fallacy, and one need only use FASM/G (Compiled Macros) to create their own tools that build faster, e.g. for a specific CPU?

For example, FASM2 uses FASM/G and it's not significantly slower than FASM?

I.e. Help people understand the true power that FASM/G offers? I.e. Need to understand the whole point of FASM/G and the power it provides?

A key point that I am seeking to have addressed is the idea that FASM/G build times relative to FASM may be seen as a reason to not use FASM/G for compiler development, yet the tools produced by FASM/G can be much faster than any Rust or even C compiler?


Last edited by Greg_M on 31 Dec 2025, 03:35; edited 1 time in total
Post 30 Dec 2025, 19:32
View user's profile Send private message Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 4342
Location: vpcmpistri
bitRAKE 31 Dec 2025, 00:22
If build times were an issue, initial startup for a particular environment could be cached as part of the system support -- the same could be done for fasm, too. (Analogous to the pre-compiled headers, [s]ccache, modules of the high-level languages.) To my knowledge, no such effort has ever been made.
Post 31 Dec 2025, 00:22
View user's profile Send private message Visit poster's website Reply with quote
Greg_M



Joined: 07 Jun 2025
Posts: 53
Greg_M 31 Dec 2025, 21:25
Post from 2020. May cause concern for those considering FASM/G?
Quote:
...I don't use fasmg because it is too slow. I have to wait almost an hour to complete a compilation set...

https://board.flatassembler.net/topic.php?t=21488

It is from 2020, so perhaps improved now and/or perhaps when understood in the context, it's not an issue at all, hence my OP.
Post 31 Dec 2025, 21:25
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20814
Location: In your JS exploiting you and your system
revolution 31 Dec 2025, 22:50
For my use case fasmg is considerably slower than fasm and does cause anguish. There is a trend in software development to add more layers of abstractions and hobble code with more "baggage" making it slower and more resource hungry. I have a fast computer, dammit, I don't want to make it slower each time new code comes along. Other examples of this effect are MS Teams and all the electron apps.

In addition to performance is the extras that fasmg needs to make it a complete assembler with all the required extra supporting macro files. Zipping up a project with asm sources and the assembler and sending it as a stand-alone package to a another customer/client/user requires also sending all the extra support macros along with it to make a complete set. It complicates the process and clutters up the package with extra bloat. For small projects with a single asm source file the bloat is very noticeable and degrades the experience, compared to needing only one exe for the single asm when using fasm.

Keeping older versions available for fasm is easy, we just have each exe file with the version number appended to the filename, so assembling old code is straightforward. Supporting simultaneous older versions in fasmg needs a lot more work to setup separate folders to hold all the macros and have ways to specify those folders when assembling with different versions.

That is my experience with fasmg.
Post 31 Dec 2025, 22:50
View user's profile Send private message Visit poster's website Reply with quote
Greg_M



Joined: 07 Jun 2025
Posts: 53
Greg_M 31 Dec 2025, 23:36
revolution wrote:
...does cause anguish.
Sincere sympathy, but again, FASM/G is still _much_ faster than Rust, C++ or even C compiler?

revolution wrote:
There is a trend in software development to add more layers of abstractions and hobble code with more "baggage" making it slower and more resource hungry. Other examples of this effect are MS Teams and all the electron apps.
Agree! That's why I avoid Java and .NET and bloatware in general. Some exceptions, e.g., sometimes generics, such as list<T>, in a language are OK, provided that they are implemented efficiently.

revolution wrote:
In addition to performance is the extras that fasmg needs to make it a complete assembler with all the required extra supporting macro files. Zipping up a project with asm sources and the assembler and sending it as a stand-alone package to a another customer/client/user requires also sending all the extra support macros along with it to make a complete set. It complicates the process and clutters up the package with extra bloat.
That's related to my OP. A product based on FASM/G, e.g. FASM2 may be a bit slower than FASM but not much? Does FASM2 performance extrapolate to a compiler based on FASM/G? Is this basically moot because still, FASM/G is faster than even a C compiler? These are my key questions that I still seek an answer to.


Last edited by Greg_M on 01 Jan 2026, 02:59; edited 1 time in total
Post 31 Dec 2025, 23:36
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20814
Location: In your JS exploiting you and your system
revolution 01 Jan 2026, 00:35
fasmg doesn't compile C code. And C compilers don't assemble asm sources. I don't see how those can be compared in a meaningful way. Question
Post 01 Jan 2026, 00:35
View user's profile Send private message Visit poster's website Reply with quote
Greg_M



Joined: 07 Jun 2025
Posts: 53
Greg_M 01 Jan 2026, 01:29
revolution wrote:
fasmg doesn't compile C code. And C compilers don't assemble asm sources. I don't see how those can be compared in a meaningful way. :?:
Perspective.
Post 01 Jan 2026, 01:29
View user's profile Send private message Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 4342
Location: vpcmpistri
bitRAKE 01 Jan 2026, 03:10
revolution wrote:
C compilers don't assemble asm sources.
Modern compilers function less as monolithic translators and more as modular platforms or orchestrators. They act as a central interface (often called the Compiler Driver) that coordinates a pipeline of specialized components and exposes internal data structures to external developer tools.

Compiler drivers do process/assemble asm sources. For GCC the assembly tooling is separate, but Clang has an integrated assembler (which can be bypassed for the traditional external tool). This impacts both inline assembly and stand-alone files.

MSVC is a different beast - no inline assembly support - must use intrinsics or external assembly code. In that regard you are completely correct, but the other cases are more complicated as the compiler driver makes assembly integration seamless with other language support.

Yet, I agree with the comparison to fasmg being largely invalid. fasmg is somewhere between the compiler drivers and monolithic translators (fasm, tcc, etc.).

_________________
¯\(°_o)/¯ AI may [not] have aided with the above reply.
Post 01 Jan 2026, 03:10
View user's profile Send private message Visit poster's website Reply with quote
Greg_M



Joined: 07 Jun 2025
Posts: 53
Greg_M 01 Jan 2026, 19:06
bitRAKE wrote:
...I agree with the comparison to fasmg being largely invalid.
The use of C was merely an example for a general tool process that translates source code to binary code (obviously, C code is not assembly code).

I haven't received a clear and emphatic response that FASM/G builds are fast, if not very fast, relative to general tools. FASM/G and its application of math theory for customizable/flexible code, does appear powerful for language development. I'm developing a new language, a hybrid of C-like and functional programming, and had been considering a tool to use, and FASM/G and C are both tools that support compiler development.

I also see that the board description here states: "...for users of flat assembler" and doesn't include "for prospective users" so perhaps this isn't the right board for questions like mine, and if not, I apologize for distracting with off-topic posts.
Post 01 Jan 2026, 19:06
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20814
Location: In your JS exploiting you and your system
revolution 01 Jan 2026, 20:31
Greg_M wrote:
I haven't received a clear and emphatic response that FASM/G builds are fast ...
"fast" is a vague and relative term. It depends upon what is being timed and how the comparison is conducted.

If there is a specific test that can be constructed, then some sort of comparison might be doable, but it would only apply to that case. Other situations can give different results.

So giving a single "emphatic" response of X is faster then Y is tricky.

I suggest to test it, and use it where the use cases shows an advantage, and avoid it in cases where there is a disadvantage.

There is no authority that can "emphaticly" and unambiguously state that fasmg is "faster", or that it is "slower", or indeed any speed comparison, because it depends upon the situation.

I gave my anecdote above for my use cases, that fasmg is slower than fasm. That might mean nothing for the use case described in the OP when compared to C. Although it still isn't clear to me how such a comparison to C can be made. Providing more details on that would be appreciated.
Post 01 Jan 2026, 20:31
View user's profile Send private message Visit poster's website Reply with quote
Greg_M



Joined: 07 Jun 2025
Posts: 53
Greg_M 01 Jan 2026, 23:01
revolution wrote:
Although it still isn't clear to me how such a comparison to C can be made. Providing more details on that would be appreciated.
I'm not using FASM. Do you use FASM instead of C? If so, why?
Post 01 Jan 2026, 23:01
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20814
Location: In your JS exploiting you and your system
revolution 02 Jan 2026, 00:00
fasm is an an assembler, I use it to assemble assembly code. C is an HLL compiler, I use it to compile HLL code. So both are used. It isn't a one or the other thing.

I still can't see how to compare C to fasmg. Is it intended that fasmg uses a set of macros to compile HLL C code? Or is the intention to use C to assemble asm code? Or a mixture of both, somehow, and see which is the fastest?
Post 02 Jan 2026, 00:00
View user's profile Send private message Visit poster's website Reply with quote
Greg_M



Joined: 07 Jun 2025
Posts: 53
Greg_M 02 Jan 2026, 01:06
Perhaps FASMG, with a "library" of user-defined Compiled-Assembly-Like-Macro instructions could be comparable to C in productivity and yet still have faster build times.


Last edited by Greg_M on 02 Jan 2026, 03:18; edited 1 time in total
Post 02 Jan 2026, 01:06
View user's profile Send private message Reply with quote
Greg_M



Joined: 07 Jun 2025
Posts: 53
Greg_M 02 Jan 2026, 02:52
bitRAKE wrote:
If build times were an issue, initial startup for a particular environment could be cached as part of the system support -- the same could be done for fasm, too. (Analogous to the pre-compiled headers, [s]ccache, modules of the high-level languages.) To my knowledge, no such effort has ever been made.
Is this related?: https://board.flatassembler.net/topic.php?t=24110

If so, I better understand your point now, thank you.
Post 02 Jan 2026, 02:52
View user's profile Send private message Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 4342
Location: vpcmpistri
bitRAKE 02 Jan 2026, 16:27
bitRAKE wrote:
fasmg is somewhere between the compiler drivers and monolithic translators (fasm, tcc, etc.).
Perhaps it would be better to say fasmg is equal distance from compiler drivers and monolithic translators - rather than give the impression there is some type of continuum.

If we wanted to have a meaningful test of performance there are plenty of libraries of assembly functions - these would be adapted for building with various tools. It takes existing public use cases and restricts all the tools to this subset of functionality -- unfair by design. Don't experienced people already know the result of this test though?
Greg_M wrote:
Is this related?: https://board.flatassembler.net/topic.php?t=24110

If so, I better understand your point now, thank you.
... there are several techniques to cache compiler state in a meaningful way. I've been intentionally vague, but I wouldn't want to sacrifice features in the caching. An immutable experiment might be an early attempt at caching - a static cache that avoids all passes -- this would force a syntax split.

My recommendation would be to read the source code - understand the core and the system interface.

_________________
¯\(°_o)/¯ AI may [not] have aided with the above reply.
Post 02 Jan 2026, 16:27
View user's profile Send private message Visit poster's website Reply with quote
Greg_M



Joined: 07 Jun 2025
Posts: 53
Greg_M 02 Jan 2026, 21:29
bitRAKE wrote:
My recommendation would be to read the source code - understand the core and the system interface.
I'm developing a new memory safe programming language and seeking a tool to develop it. I can share link to language design if helpful (it's open source). I seek to avoid working on a path, then discover something lacking. For example, C has parsing libraries and standard lib. These can be used from FASM2? I don't mind writing code either, but ability to use libs is helpful.
Post 02 Jan 2026, 21:29
View user's profile Send private message Reply with quote
AsmGuru62



Joined: 28 Jan 2004
Posts: 1751
Location: Toronto, Canada
AsmGuru62 02 Jan 2026, 21:51
Can you define "memory safe" term?
What does it mean exactly?
A link to the language design would be nice.
Post 02 Jan 2026, 21:51
View user's profile Send private message Send e-mail Reply with quote
Greg_M



Joined: 07 Jun 2025
Posts: 53
Greg_M 02 Jan 2026, 22:24
AsmGuru62 wrote:
Can you define "memory safe" term?

https://www.cisa.gov/sites/default/files/2023-12/CSAC_TAC_Recommendations-Memory-Safety_Final_20231205_508.pdf

AsmGuru62 wrote:
A link to the language design would be nice.

https://github.com/McPherran/Programming-Language
Post 02 Jan 2026, 22:24
View user's profile Send private message 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 cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.