Skip to content

Scope strict FP to the decompiled sources#6812

Closed
bassdr wants to merge 1 commit into
HarbourMasters:developfrom
bassdr:pr/scope-strict-fp
Closed

Scope strict FP to the decompiled sources#6812
bassdr wants to merge 1 commit into
HarbourMasters:developfrom
bassdr:pr/scope-strict-fp

Conversation

@bassdr

@bassdr bassdr commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Follow-up to #6811: scope the no-FMA / no-fast-math flags to soh/src (decomp) instead of the whole build. IS_ZERO removal retained.

Build Artifacts

Apply the no-FMA / no-fast-math flags (MSVC /fp:precise) to soh/src only,
rather than globally as in HarbourMasters#6811.
@bassdr

bassdr commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

I re-tested the same soft-lock described in #6809. It's still fixed. I also experimented enabling LTO and no issue so far. Might be a way to get better performances on arm64 without sacrificing original console precise maths. I did not mesure the perf gain yet though.

What do you think?

@serprex

serprex commented Jun 25, 2026

Copy link
Copy Markdown
Member

I don't think it's worth it. We often copy decomp code into hooks etc, it'd be a weird error to figure out. Maybe scoping it to C++ in libultraship would avoid trouble. Ideally audio processing etc has simd intrinsics or something anyway. C99 introduced fma function to math.h, so code can always apply optimization itself

original mac PR scoped it to soh/src, but we decided to apply it globally since audio perf wasn't negatively impacted

@bassdr

bassdr commented Jun 25, 2026

Copy link
Copy Markdown
Contributor Author

Closing, will experiment adding intrinsic or simd per-function optimisation instead. Indeed, audio usually benefit from fast math without compromising precision, but it's not a general rule elsewhere in the codebase. #6668 's modern audio pipeline is one of these candidates.

@bassdr bassdr closed this Jun 25, 2026
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