-
-
Notifications
You must be signed in to change notification settings - Fork 48
refactor: extract bevy_mod_scripting_asset
and bevy_mod_scripting_display
crates, decouple concerns
#477
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ng_display` crates, decouple concerns
0f29b53
to
d4621ee
Compare
|
Branch | refactor/extract-bindings-crate |
Testbed | linux-gha |
Click to view all benchmark results
Benchmark | Latency | Benchmark Result nanoseconds (ns) (Result Δ%) | Upper Boundary nanoseconds (ns) (Limit %) |
---|---|---|---|
component/access Lua | 📈 view plot 🚷 view threshold | 3,578.00 ns(-10.38%)Baseline: 3,992.57 ns | 4,431.35 ns (80.74%) |
component/access Rhai | 📈 view plot 🚷 view threshold | 5,315.50 ns(-9.29%)Baseline: 5,859.73 ns | 6,481.33 ns (82.01%) |
component/get Lua | 📈 view plot 🚷 view threshold | 2,201.20 ns(-8.93%)Baseline: 2,417.00 ns | 2,714.16 ns (81.10%) |
component/get Rhai | 📈 view plot 🚷 view threshold | 4,085.50 ns(-7.15%)Baseline: 4,399.91 ns | 4,913.42 ns (83.15%) |
conversions/Mut::from | 📈 view plot 🚷 view threshold | 79.04 ns(-8.21%)Baseline: 86.11 ns | 94.29 ns (83.83%) |
conversions/Ref::from | 📈 view plot 🚷 view threshold | 76.85 ns(-8.37%)Baseline: 83.87 ns | 91.30 ns (84.18%) |
conversions/ScriptValue::List | 📈 view plot 🚷 view threshold | 342.45 ns(+17.50%)Baseline: 291.45 ns | 355.48 ns (96.33%) |
conversions/ScriptValue::Map | 📈 view plot 🚷 view threshold | 961.19 ns(-14.46%)Baseline: 1,123.69 ns | 1,535.91 ns (62.58%) |
conversions/ScriptValue::Reference::from_into | 📈 view plot 🚷 view threshold | 25.39 ns(+1.33%)Baseline: 25.05 ns | 29.76 ns (85.31%) |
conversions/Val::from_into | 📈 view plot 🚷 view threshold | 297.03 ns(-0.90%)Baseline: 299.73 ns | 341.95 ns (86.86%) |
function/call 4 args Lua | 📈 view plot 🚷 view threshold | 1,645.90 ns(-12.05%)Baseline: 1,871.40 ns | 2,123.68 ns (77.50%) |
function/call 4 args Rhai | 📈 view plot 🚷 view threshold | 1,307.80 ns(-14.18%)Baseline: 1,523.89 ns | 1,775.40 ns (73.66%) |
function/call Lua | 📈 view plot 🚷 view threshold | 226.59 ns(-6.29%)Baseline: 241.79 ns | 267.44 ns (84.73%) |
function/call Rhai | 📈 view plot 🚷 view threshold | 455.36 ns(-3.42%)Baseline: 471.46 ns | 525.98 ns (86.57%) |
loading/empty Lua | 📈 view plot 🚷 view threshold | 50,951.00 ns(-19.78%)Baseline: 63,513.40 ns | 75,728.56 ns (67.28%) |
loading/empty Rhai | 📈 view plot 🚷 view threshold | 303,510.00 ns(-19.83%)Baseline: 378,579.00 ns | 474,870.88 ns (63.91%) |
math/vec mat ops Lua | 📈 view plot 🚷 view threshold | 6,579.80 ns(-16.03%)Baseline: 7,835.66 ns | 9,548.47 ns (68.91%) |
math/vec mat ops Rhai | 📈 view plot 🚷 view threshold | 5,739.70 ns(-13.10%)Baseline: 6,604.62 ns | 7,533.35 ns (76.19%) |
query/10 entities Lua | 📈 view plot 🚷 view threshold | 17,602.00 ns(-14.49%)Baseline: 20,585.90 ns | 23,667.36 ns (74.37%) |
query/10 entities Rhai | 📈 view plot 🚷 view threshold | 17,579.00 ns(-14.00%)Baseline: 20,440.70 ns | 23,315.37 ns (75.40%) |
query/100 entities Lua | 📈 view plot 🚷 view threshold | 38,241.00 ns(-9.72%)Baseline: 42,358.70 ns | 46,499.09 ns (82.24%) |
query/100 entities Rhai | 📈 view plot 🚷 view threshold | 30,824.00 ns(-7.32%)Baseline: 33,258.90 ns | 36,812.69 ns (83.73%) |
query/1000 entities Lua | 📈 view plot 🚷 view threshold | 242,920.00 ns(-11.71%)Baseline: 275,152.00 ns | 311,520.61 ns (77.98%) |
query/1000 entities Rhai | 📈 view plot 🚷 view threshold | 186,690.00 ns(+9.29%)Baseline: 170,822.00 ns | 189,536.20 ns (98.50%) |
reflection/10 Lua | 📈 view plot 🚷 view threshold | 5,548.20 ns(-10.67%)Baseline: 6,211.23 ns | 6,933.63 ns (80.02%) |
reflection/10 Rhai | 📈 view plot 🚷 view threshold | 14,610.00 ns(-7.42%)Baseline: 15,781.20 ns | 16,955.72 ns (86.17%) |
reflection/100 Lua | 📈 view plot 🚷 view threshold | 47,847.00 ns(-7.27%)Baseline: 51,596.10 ns | 57,114.16 ns (83.77%) |
reflection/100 Rhai | 📈 view plot 🚷 view threshold | 740,370.00 ns(-3.69%)Baseline: 768,766.00 ns | 836,545.99 ns (88.50%) |
resource/access Lua | 📈 view plot 🚷 view threshold | 3,143.10 ns(-11.88%)Baseline: 3,566.82 ns | 4,017.59 ns (78.23%) |
resource/access Rhai | 📈 view plot 🚷 view threshold | 4,915.10 ns(-7.76%)Baseline: 5,328.79 ns | 5,832.22 ns (84.27%) |
resource/get Lua | 📈 view plot 🚷 view threshold | 1,803.80 ns(-12.13%)Baseline: 2,052.73 ns | 2,354.08 ns (76.62%) |
resource/get Rhai | 📈 view plot 🚷 view threshold | 3,664.00 ns(-6.44%)Baseline: 3,916.37 ns | 4,360.67 ns (84.02%) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
DisplayWithWorld
in favour ofDisplayWithTypeInfo
andDebugWithTypeInfo
DebugWithTypeInfo
which also generates a conventionalDebug
impl which will use type info if availableWithTypeInfo::new(my_type)
wrapper in conventional format stringsInteropError
is now completely separate from teh core crate and implements both display and debug with type infodisplay_ref
anddisplay_value
removed in favour ofdisplay
anddebug
display_value
effectively becamedisplay
, anddisplay_ref
was turned intodebug
Migration Guide
bevy_mod_scripting_bindings
,bevy_mod_scripting_display
,bevy_mod_scripting_asset
) where appropriate, if you rely on the workspace these will be re-exported underbindings
,display
andasset
respectivelyDisplayWithWorld
usage withDisplayWithTypeInfo
/DebugWithTypeInfo
and useWithTypeInfo::new(value)
in format strings. Ensure that the WorldGuard is in scope when printing using these utilities, or you might see raw type id's