mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-20 01:07:18 +03:00
b318cb0299
Remove the `Ctrl` trait and separate `Machine.ctrl: Ctrl` into `Machine.ctrl: SExpr` and `Machine.returnValue: SValue` instead. This allows for avoiding dynamic dispatch on `ctrl` and instead allows for checking a pointer for `null` to decide if we have an expression that needs further break-down or a return value ready to be passed to the next continuation. To make this check really only a pointer comparison we also needed to remove the abomination of "fully applied partially applied primitives". In order to achieve this, we check whether a PAP will be fully applied afterward when applying the last argument. On the `collect-authority` benchmark, this increases throughput by around 13%, on another more computation heave benchmark by about 21%. `collect-authority` benchmark on `master`: ``` Result "com.daml.lf.speedy.perf.CollectAuthority.bench": 112.361 ±(99.9%) 1.965 ms/op [Average] (min, avg, max) = (107.047, 112.361, 120.745), stdev = 3.493 CI (99.9%): [110.396, 114.326] (assumes normal distribution) ``` `collect-authority` benchmark on this branch: ``` Result "com.daml.lf.speedy.perf.CollectAuthority.bench": 98.196 ±(99.9%) 1.933 ms/op [Average] (min, avg, max) = (91.580, 98.196, 105.478), stdev = 3.436 CI (99.9%): [96.263, 100.129] (assumes normal distribution) ``` computation heavy benchmark on master ``` Result "com.daml.lf.speedy.perf.CollectAuthority.bench": 44.030 ±(99.9%) 0.742 ms/op [Average] (min, avg, max) = (42.124, 44.030, 46.781), stdev = 1.319 CI (99.9%): [43.289, 44.772] (assumes normal distribution) ``` computation heavy benchmark on this branch: ``` Result "com.daml.lf.speedy.perf.CollectAuthority.bench": 36.222 ±(99.9%) 0.580 ms/op [Average] (min, avg, max) = (34.897, 36.222, 39.787), stdev = 1.031 CI (99.9%): [35.643, 36.802] (assumes normal distribution) ``` changelog_begin changelog_end |
||
---|---|---|
.. | ||
daml | ||
runner | ||
service | ||
tests |