-
-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[low prio] [feature inquiry] Performance CFLAGS (-O2, -march=native, etc.) #614
Comments
Hey @stradicat Thanks for raising this question. To be honest, Emacs+ doesn't do anything special with
There is no specific reason 😄 So it would be a nice contribution.
Not aware of this flag. What does it do? If my intuitive understanding is correct, it's OK to add this for cocoa flag (some people use Emacs+ on Lunux). |
Thanks for looking into this! In Linux packages, Since emacs-plus is compiled from source and the host machine is its own target, throwing in Taking into account that Emacs is an interpreter, above all, this can give it a small performance edge, noticeable in terms of latency related to user input. What do you think? |
Better yet: I'll run some measurements and come back with a PR. |
What you say makes total sense. So I will be happy to see your PR 😸 P.S. Thanks for explanations 🙏 |
Closing since #698 was accepted :) |
Indeed, completely forgot to close the original "issue" 😅 thanks! |
Hi!
I've noticed that
emacs-plus
is built by default with-Os
, which tries to minimize code size while optimizing towards-O2
level.However, since the hardware where Homebrew runs has large-ish cache sizes (oldest officially BigSur-compatible machines have 256kb of L2 & 3Mb of L3 caches, like the 2013 11-inch MacBook Air), is there a specific reason not to go with
-O2
? (At least when building--with-native-compilation
)I was also wondering if adding
-march=native
would make sense, since the formula is compiled on the destination machine anyway.For comparison, the following options are enabled on Linux builds of Emacs: (Ubuntu case, kelleyk PPA)
CFLAGS="-pipe -O2 -flto=auto -ffat-lto-objects -fstack-protector-strong"
CPPFLAGS="-Wdate-time -D_FORTIFY_SOURCE=2"
LDFLAGS="-Wl,-Bsymbolic-functions -Wl,-z,relro"
The text was updated successfully, but these errors were encountered: