-
Notifications
You must be signed in to change notification settings - Fork 890
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce constant function for further compiler optimizations
GNU extension __attribute__((const)) helps the compiler to know semantic meaning of a function call, so that it allows higher optimization than to normal functions. For example, Common Sub-expression Elimination (CSE) is used to avoid duplicating the same code inside a function, and function "_mi_os_page_size" can benefit from CSE optimization once it is declared as a constant function. Reference: https://lwn.net/Articles/285332/
- Loading branch information
Showing
2 changed files
with
10 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters