Skip to content

Conversation

@akx
Copy link
Contributor

@akx akx commented May 16, 2025

I tried Arnis with a large area that was painfully slow on --debug, and would just hang on --release.

I mustered enough patience to wait for --debug to do its thing, only to see it panic on a overflow.

This PR fixes two of the overflow panics I found, and also turns on overflow-checks in release builds so they won't hang in similar situations.

@benjamin051000
Copy link
Contributor

What performance penalty does overflow checking have in release?

@akx
Copy link
Contributor Author

akx commented May 17, 2025

What performance penalty does overflow checking have in release?

Presumably some, since it's not enabled by default in release 😅 I didn't measure.

@GMart
Copy link
Contributor

GMart commented May 17, 2025

retrigger-benchmark

@github-actions
Copy link

github-actions bot commented May 17, 2025

⏱️ Benchmark run finished in 1m 58s
🧠 Peak memory usage: 1611 MB

📈 Compared against baseline: 124s
🧮 Delta: -6s
🔢 Commit: 047e3a0

✅ This PR improves generation time.

You can retrigger the benchmark by commenting retrigger-benchmark.

@akx
Copy link
Contributor Author

akx commented May 18, 2025

Btw, I wouldn't necessarily trust the benchmark results - AISI, it's measuring how long the implicit cargo build for a cargo run takes?

It'd be better to cargo build --release --no-default-features first, and then benchmark a couple times with e.g. hyperfine to make things more sound statistically.

I can PR that if there's interest. See #457

@louis-e
Copy link
Owner

louis-e commented May 24, 2025

retrigger-benchmark

@louis-e
Copy link
Owner

louis-e commented May 24, 2025

Thanks a lot for the contribution, looks good to me! :)

What performance penalty does overflow checking have in release?

I did a few local benchmarks, doesn't seem too worse to me. But I definitely want to check that again in more detail before the next release.

Btw, I wouldn't necessarily trust the benchmark results - AISI, it's measuring how long the implicit cargo build for a cargo run takes?

It'd be better to cargo build --release --no-default-features first, and then benchmark a couple times with e.g. hyperfine to make things more sound statistically.

I can PR that if there's interest. See #457

You're definitely right with that, thanks for already opening a PR for that. Will look into that asap!

@louis-e louis-e merged commit de79896 into louis-e:main May 24, 2025
3 of 4 checks passed
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.

4 participants