-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a lot of big jumps again from 0 to billion values
.saturating_add(Weight::from_ref_time(13_944_000 as u64).saturating_mul(v as u64)) | ||
// Standard Error: 4_876_000 | ||
.saturating_add(Weight::from_ref_time(2_223_649_000 as u64).saturating_mul(d as u64)) | ||
Weight::from_ref_time(5_472_372_000 as u64) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
big jump from 0 -> 5_472_372_000
.saturating_add(Weight::from_ref_time(14_480_000 as u64).saturating_mul(v as u64)) | ||
// Standard Error: 6_844_000 | ||
.saturating_add(Weight::from_ref_time(2_525_332_000 as u64).saturating_mul(d as u64)) | ||
Weight::from_ref_time(4_270_710_000 as u64) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here from 0 -> 4_270_710_000
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even the worst case improvement is 31.8% here, so it is better now.
The crux is that the components do not start at 0, as you can see code comment above the function.
SWC now evaluates both formulas at all corners and compares them to find the worst case improvement. In this case:
27106660000 vs 18355259455 (-32.285056679797506) [d = 5, v = 1.00K]
41586660000 vs 23769227455 (-42.844105645897024) [d = 5, v = 2.00K]
54885312000 vs 37430538656 (-31.802266777676323) [d = 16, v = 1.00K]
69365312000 vs 42844506656 (-38.233527074743066) [d = 16, v = 2.00K]
// Standard Error: 17_000 | ||
.saturating_add(Weight::from_ref_time(180_000 as u64).saturating_mul(d as u64)) | ||
fn elect_queued(a: u32, _d: u32, ) -> Weight { | ||
Weight::from_ref_time(389_938_000 as u64) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0 -> 389_938_000
// Standard Error: 35_000 | ||
.saturating_add(Weight::from_ref_time(2_257_000 as u64).saturating_mul(d as u64)) | ||
fn submit_unsigned(_v: u32, _t: u32, a: u32, _d: u32, ) -> Weight { | ||
Weight::from_ref_time(6_923_558_000 as u64) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0 -> 6_923_558_000
// Standard Error: 63_000 | ||
.saturating_add(Weight::from_ref_time(1_598_000 as u64).saturating_mul(d as u64)) | ||
fn feasibility_check(v: u32, _t: u32, a: u32, _d: u32, ) -> Weight { | ||
Weight::from_ref_time(6_146_628_000 as u64) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
again 0 -> 6_146_628_000
.saturating_add(Weight::from_ref_time(24_156_000 as u64).saturating_mul(n as u64)) | ||
.saturating_add(T::DbWeight::get().reads(187 as u64)) | ||
.saturating_add(T::DbWeight::get().reads((5 as u64).saturating_mul(v as u64))) | ||
Weight::from_ref_time(441_118_000 as u64) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0 -> 441_118_000
.saturating_add(T::DbWeight::get().reads((4 as u64).saturating_mul(n as u64))) | ||
.saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(s as u64))) | ||
fn get_npos_voters(v: u32, n: u32, _s: u32, ) -> Weight { | ||
Weight::from_ref_time(25_869_841_000 as u64) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0 -> 25_869_841_000
.saturating_add(Weight::from_ref_time(6_515_000 as u64).saturating_mul(v as u64)) | ||
.saturating_add(T::DbWeight::get().reads(2 as u64)) | ||
.saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(v as u64))) | ||
Weight::from_ref_time(3_445_194_000 as u64) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0 -> 3_445_194_000
.saturating_add(T::DbWeight::get().writes(1 as u64)) | ||
.saturating_add(T::DbWeight::get().writes((1 as u64).saturating_mul(c as u64))) | ||
.saturating_add(T::DbWeight::get().writes((3 as u64).saturating_mul(t as u64))) | ||
Weight::from_ref_time(548_530_000 as u64) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0 -> 548_530_000
.saturating_add(T::DbWeight::get().writes(4 as u64)) | ||
.saturating_add(T::DbWeight::get().writes((3 as u64).saturating_mul(i as u64))) | ||
.saturating_add(T::DbWeight::get().writes((3 as u64).saturating_mul(e as u64))) | ||
Weight::from_ref_time(859_684_000 as u64) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0 -> 859_684_000
.saturating_add(T::DbWeight::get().reads(256 as u64)) | ||
.saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(i as u64))) | ||
.saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(e as u64))) | ||
.saturating_add(T::DbWeight::get().writes(384 as u64)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We cannot use that. Same problem as here paritytech/cumulus#1784
And should be fixed in paritytech/substrate#12482
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
let's find out if they're good this time around! 🏋️♀️