You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The chaos binary and the binaries produced by the Chaos compiler requires certain optimizations:
GCC Common Function Attributes
Using the Common Function Attributes like cold, hot, flatten, always_inline, used, unused etc. the functions in Chaos language's source needs to be optimized. These attributes can also be used in the generated intermediate C code if they are applicable.
GCC Optimize Options
Using the Optimize Options like -O3 the binaries produced by the project needs to be optimized. The Chaos compiler GCC commands supports extra flags using -e flag. For example: -e "-ggdb" So it's open to discussion that should -O3 included to the GCC commands by default or let the users decide.
Unused Functions
Move unused functions (if there are any) or global declarations to other files if they are not used by the compiled Chaos programs.
Strip
Should we strip the binaries with -s flag to reduce the binary size?
Structs & Allocations
Remove the unused members of structs in the language's source or disable them using macros according to the related case. Determine not freed or freed with an unnecessary delay memory allocations and fix them.
The
chaos
binary and the binaries produced by the Chaos compiler requires certain optimizations:GCC Common Function Attributes
Using the Common Function Attributes like
cold
,hot
,flatten
,always_inline
,used
,unused
etc. the functions in Chaos language's source needs to be optimized. These attributes can also be used in the generated intermediate C code if they are applicable.GCC Optimize Options
Using the Optimize Options like
-O3
the binaries produced by the project needs to be optimized. The Chaos compiler GCC commands supports extra flags using-e
flag. For example:-e "-ggdb"
So it's open to discussion that should-O3
included to the GCC commands by default or let the users decide.Unused Functions
Move unused functions (if there are any) or global declarations to other files if they are not used by the compiled Chaos programs.
Strip
Should we strip the binaries with
-s
flag to reduce the binary size?Structs & Allocations
Remove the unused members of
struct
s in the language's source or disable them using macros according to the related case. Determine not freed or freed with an unnecessary delay memory allocations and fix them.More optimization ideas can be extracted from Extensions to the C Language Family documentation page.
The text was updated successfully, but these errors were encountered: