perf(ethcore): micro-opt#10405
Conversation
| Failed(ExecutionError), | ||
| /// The transaction successfully completd with the given proof. | ||
| Complete(Executed), | ||
| Complete(Box<Executed>), |
There was a problem hiding this comment.
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
| TemporarilyInvalid(OutOfBounds<SystemTime>), | ||
| /// Log bloom header field is invalid. | ||
| InvalidLogBloom(Mismatch<Bloom>), | ||
| InvalidLogBloom(Box<Mismatch<Bloom>>), |
There was a problem hiding this comment.
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 |
Mostly fixes that changes
eagerly evaltolazy evalshouldn't impact much