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

serde_userdata: Remove map_err to reduce compile time impact #441

Merged
merged 4 commits into from
Aug 21, 2024

Conversation

s-nie
Copy link
Contributor

@s-nie s-nie commented Aug 19, 2024

map_err has a disproportionate impact on the LLVM IR generated. In generic functions it's beneficial for compile times to avoid it. This reduces the LLVM lines of a crate that heavily uses mlua from 2420270 to 2302295. It could be reduced by a further 50000 lines by manually inlining serde_userdata, but as that would make the code a bit less readable I'm holding off on that.

@khvzak khvzak merged commit 26b9bdb into mlua-rs:main Aug 21, 2024
128 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.

2 participants