-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Conversation
@@ -83,7 +83,7 @@ pub enum ProvedExecution { | |||
/// The transaction failed, but not due to a bad proof. | |||
Failed(ExecutionError), | |||
/// The transaction successfully completd with the given proof. | |||
Complete(Executed), | |||
Complete(Box<Executed>), |
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.
Executed is quite big (368 bytes) and thus the enum will be size of biggest enum value.
For example if a function returns ProvedExecution
the compiler must preserve stack to be at least 368 because it can't know which branch to take (technically the caller preserve must preserve this).
However, I'm not sure of the performance implications because I haven't benched it but I guess 5-40% (might even be worse when a lot calls are chained
, i.e. passed on into to several functions by value)
Seems to only be used by light::on_demand::request
and engine::validator_set::safe_contract
@@ -84,7 +84,7 @@ pub enum BlockError { | |||
/// Timestamp header field is too far in future. | |||
TemporarilyInvalid(OutOfBounds<SystemTime>), | |||
/// Log bloom header field is invalid. | |||
InvalidLogBloom(Mismatch<Bloom>), | |||
InvalidLogBloom(Box<Mismatch<Bloom>>), |
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.
Bloom: 256 bytes
01abb79
to
f518a6c
Compare
Mostly fixes that changes `eagerly eval` to `lazy eval`
f518a6c
to
7c0b645
Compare
@niklasad1 is it possible to add some microbenchmarks to this as well to see what the change is? I feel like we could use more benchmarks across the board |
@folsen yeah I think so. I can try to add that but I think the only noticeable difference is the |
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.
LGTM
Mostly fixes that changes
eagerly eval
tolazy eval
shouldn't impact much