Skip to content
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

build: Switch GraalVM -march flag from native to compatibility #1488

Merged
merged 1 commit into from
Oct 17, 2024

Conversation

medsouz
Copy link
Contributor

@medsouz medsouz commented Oct 16, 2024

-march=native can improve performance but will add a hard requirement for every CPU extension present on your CPU. This can cause issues with older CPUs or CPUs from different vendors (AMD vs Intel).

-march=compatibility will ensure the best compatibility with a potential performance penalty. In my experience this is not usually noticable in applications like neo4j-migrations.

If performance is a concern then another option would be to remove the flag and trust the defaults of GraalVM, which according to their docs are: x86-64-v3 on AMD64 and armv8-a on AArch64

`-march=native` can improve performance but will add a hard requirement
for every CPU extension present on your CPU. This can cause issues with
older CPUs or CPUs from different vendors (AMD vs Intel).

`-march=compatibility` will ensure the best compatibility with
a potential performance penalty. In my experience this is not usually
noticable in applications like neo4j-migrations.

If performance is a concern then another option would be to remove the
flag and trust the defaults of GraalVM, which according to their docs
are: `x86-64-v3 on AMD64 and armv8-a on AArch64`
@michael-simons
Copy link
Owner

Good change, thank you. Makes complete sense, and if someone wants to have all the optimization, they can build accordingly.

@michael-simons michael-simons merged commit 432ff85 into michael-simons:main Oct 17, 2024
5 checks passed
@michael-simons
Copy link
Owner

@all-contributors add @medsouz for code

Copy link
Contributor

@michael-simons

I've put up a pull request to add @medsouz! 🎉

michael-simons pushed a commit that referenced this pull request Oct 17, 2024
Adds @medsouz as a contributor for code.

This was requested by michael-simons [in this
comment](#1488 (comment))

[skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
@medsouz medsouz deleted the march-compat branch October 17, 2024 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants