Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge #239: benchmarks: updates and cleanups
5ee4bf5 benches: run each benchmark 5 times (Andrew Poelstra) 6a80cd5 benches: output a bunch more data when doing `cargo run` (Andrew Poelstra) 4bf0e9a benches: add rest of new jets (Andrew Poelstra) 08008f0 benches: add total_fee and output_is_fee jets (Andrew Poelstra) 1eb9db3 benches: refactor value handling and sampling logic for core jets (Andrew Poelstra) a13ff9d benches: refactor tx environment sampling (Andrew Poelstra) 73baa0f benches: check that all jets are actually benchmarked (Andrew Poelstra) 4505bf6 benches: move supporting functionality into library (Andrew Poelstra) ca1db02 benches: run cargo fmt (Andrew Poelstra) da3c282 benches: run clippy (Andrew Poelstra) Pull request description: This significantly improves and cleans up the benchmarks. This branch was used to generate the data for BlockstreamResearch/simplicity#247. The main changes are: * Refactors transaction environment sampling to be more extensible; extends it with the ability to create lots of fee outputs. * Replaces the recursive `Value` logic for input/output buffers with a new custom `FlatValue` type which uses flat arrays and should be much cleaner. * Writes new faster/correct samplers for the `FlatValue` type which can call into libsimplicity to do things like computing valid ges (without doing a pubkey multiplication) and computing valid gejs (which previously was just impossible) * Rewrites the sampling traits to support multiple distributions; runs the benchmarks with different distributions to find the best/worst ones rather than repeatedly benchmarking with adhoc data. For the transaction environment jets, which include all the transaction intropection jets, this makes minimal changes. A future PR should do something similar for the transaction environment, running multiple benchmarks across multiple distributions. But because these jets are implemented as lookups into a compute-once-per-tx transaction environment structure, I expect their cost to be very low and low-variance, so I did not do this work. ACKs for top commit: uncomputable: ACK 5ee4bf5 Love the `InputSample` trait and the combination of multiple samples into a bigger sample. Tree-SHA512: d0903fb08e839e4351785f484068b4ed8f25134a983a60a46d8a60f21cb2ff37a5ac5c32ac812d91f19f898d7b8e381b80aae4e66fe6b2125d89e749967c653f
- Loading branch information