Skip to content

Conversation

emuell
Copy link
Member

@emuell emuell commented Jul 18, 2025

- add a custom Clone impl for LuaCallback, which creates unique LuaAnyUserData context instances instead of sharing existing lua refs
- add a test to verify that cloned scripted patterns do not share trigger contexts
Copy link

Benchmark for ef4b453

Click to view benchmark
Test Base PR %
Cycle/Generate 48.7±0.47µs 48.1±0.78µs -1.23%
Cycle/Parse 379.2±8.06µs 376.4±8.78µs -0.74%
Rust Phrase/Clone 438.3±6.69ns 422.6±5.47ns -3.58%
Rust Phrase/Create 75.9±0.98µs 75.9±0.88µs 0.00%
Rust Phrase/Run 641.5±5.62µs 631.6±3.14µs -1.54%
Rust Phrase/Seek 134.3±248.63µs 133.4±243.85µs -0.67%
Scripted Phrase/Clone 662.8±8.34ns 656.2±8.82ns -1.00%
Scripted Phrase/Create 954.5±7.73µs 948.4±7.47µs -0.64%
Scripted Phrase/Run 1674.7±56.74µs 1674.2±7.58µs -0.03%
Scripted Phrase/Seek 219.4±444.31µs 216.4±436.72µs -1.37%

@emuell emuell merged commit ad9140c into master Jul 18, 2025
2 checks passed
@emuell emuell deleted the fix/callback-context-clones branch July 18, 2025 08:35
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.

1 participant