nickel-lang / organist

Control all your tooling from a single console
MIT License
361 stars 20 forks source link

Optimize the symbolic strings contract #218

Closed thufschmitt closed 4 days ago

thufschmitt commented 5 days ago

Optimize a bit the SymbolicString contract by removing some useless debug info and duplicate applications, as well as flattening all the strings as they are created.

Because this contract is used everywhere, this makes a typical Organist project (at least organist's own setup) run more than twice as fast.

Commit Mean [ms] Min [ms] Max [ms] Relative
(687055c) Flatten the Nix strings on the fly 99.5 ± 2.6 95.7 104.8 1.00
(0d28df8) Remove an unneeded contract application in Nix strings 113.4 ± 3.7 109.2 121.5 1.14 ± 0.05
(d7175d2) Remove a costly debug statement in the symbolic string contract 134.7 ± 12.9 123.5 165.1 1.35 ± 0.13
(879ca21, main) Merge pull request #199 from ShalokShalom/patch-1 215.7 ± 8.2 204.1 230.5 2.17 ± 0.10