|
1 | 1 | ## [0.14.0] |
2 | 2 | - Lots of performance improvements, including one major change: Lua handles no |
3 | | - longer necessarily point into the registry, they now can instead point into a |
4 | | - pre-allocated stack area. All together, you can expect (VERY rough estimate) |
5 | | - somewhere on the order of 30%-60% CPU time reduction in the cost of bindings, |
6 | | - depending on usage patterns. |
| 3 | + longer use the registry, they now instead are stored in an auxillary thread |
| 4 | + stack created solely for the purpose of holding ref values. This may seem |
| 5 | + extremely weird, but it is vastly faster than using the registry or raw tables |
| 6 | + for this purpose. The first attempt here was to use the same stack and to do |
| 7 | + a lot of complex bookkeeping to manage the references, and this DOES work, but |
| 8 | + it comes with a lot of complexity and downsides along with it. The second |
| 9 | + approach of using an auxillary thread turned out to be equally fast and with |
| 10 | + no real downsides over the previous approach. With all the performance |
| 11 | + improvements together, you can expect (VERY rough estimate) somewhere on the |
| 12 | + order of 30%-60% CPU time reduction in the cost of bindings, depending on |
| 13 | + usage patterns. |
7 | 14 | - Addition of some simple criterion.rs based benchmarking. This is the first |
8 | 15 | `rlua` release to focus on performance, but performance will hopefully remain |
9 | 16 | a focus going forward. |
10 | | -- API incompatible change: Lua handles now must ONLY be used with the `Lua` |
11 | | - instance from which they were derived. Before, this would work if both |
12 | | - instances were from the same base state, but are now restricted to ONLY the |
13 | | - matching `Lua` instance itself. This was previously only possible through |
14 | | - unsafe code, `Lua::scope`, and things like the `rental` crate which allow self |
15 | | - borrowing. For `Lua::scope` functions, you can use `Function::bind`, and for |
16 | | - everything else you can use the `RegistryKey` API. |
17 | | -- Another API incompatible change: `Lua` (and associated handle values) are no |
18 | | - longer `UnwindSafe` / `RefUnwindSafe`. They should not have been marked as |
19 | | - such before, because they are *extremely* internally mutable, so this can be |
20 | | - considered a bugfix. All `rlua` types should actually be perfectly panic safe |
21 | | - as far as *internal* invariants are concerned, but (afaict) they should not be |
22 | | - marked as `UnwindSafe` due to internal mutability and thus potentially |
23 | | - breaking *user* invariants. |
| 17 | +- API incompatible change: `Lua` is no longer `RefUnwindSafe` and associated |
| 18 | + handle values are no longer `UnwindSafe` or `RefUnwindSafe`. They should not |
| 19 | + have been marked as such before, because they are *extremely* internally |
| 20 | + mutable, so this can be considered a bugfix. All `rlua` types should actually |
| 21 | + be perfectly panic safe as far as *internal* invariants are concerned, but |
| 22 | + (afaict) they should not be marked as `RefUnwindSafe` due to internal |
| 23 | + mutability and thus potentially breaking *user* invariants. |
24 | 24 | - Several Lua stack checking bugs have been fixed that could have lead to |
25 | 25 | unsafety in release mode. |
26 | 26 |
|
|
0 commit comments