Scoped userdata performance improvements #722
benniekiss
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I recently ran into the performance impacts of using
scopeduserdata when writing some lua bindings forpest. My scoped approach was about 15x slower than simply converting all of thepestast to an owned data structure. However, I lost a lot of the pest machinery, and I had to re-implement a lot of private functions to make it work as I want/need.I started researching the prior discussions on scoped userdata performance and
TypeId'staticrequirements, and I ran across this crate, https://github.com/dtolnay/typeid. It providesTypeIdfunctionality for non-static types, and I was wondering if this had been evaluated or considered for use in mlua. As the lack ofTypeIdsupport seems to be a significant cause of the performance impacts, I thought it may be worth an attempt at using the crate, but I am very new to rust, so I may be entirely missing the mark here :-PBeta Was this translation helpful? Give feedback.
All reactions