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

Disable all debug assertions unless the debug feature is enabled #40

Merged

Conversation

sunfishcode
Copy link
Contributor

Several debug assertions are very expensive, causing allocation heavy code to be slowed down by over 100x in some cases.

The patch here was written by @bjorn3. I can add that I've also observed excessively slow performance in debug builds. It's my impression that the dlmalloc code is written with the assumption that its asserts won't be enabled in practice, even in typical "debug build" scenarios, because users would usually be using a precompiled malloc. But ported to Rust here, it does typically get built from source.

Several debug assertions are very expensive, causing allocation heavy
code to be slowed down by over 100x in some cases.
Copy link
Owner

@alexcrichton alexcrichton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@alexcrichton alexcrichton merged commit 104c44c into alexcrichton:main Mar 1, 2024
10 checks passed
@sunfishcode sunfishcode deleted the sunfishcode/debug-asserts branch March 1, 2024 20:03
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.

3 participants