Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
flattenLet applied in bottomup traversal
Ensures deeply nested let-bindings are flattened first so that let-expressions do not get inlined into argument positions in their unflattened form. Has some minor performance effects. Before: ``` benchmarking normalization of examples/Reducer.hs time 395.2 ms (385.3 ms .. 410.2 ms) 1.000 R² (1.000 R² .. 1.000 R²) mean 401.3 ms (396.8 ms .. 406.4 ms) std dev 5.429 ms (1.784 ms .. 7.434 ms) variance introduced by outliers: 19% (moderately inflated) benchmarking normalization of tests/shouldwork/Basic/AES.hs time 161.3 ms (160.1 ms .. 162.5 ms) 1.000 R² (1.000 R² .. 1.000 R²) mean 164.9 ms (163.1 ms .. 169.4 ms) std dev 4.042 ms (490.2 μs .. 5.968 ms) variance introduced by outliers: 12% (moderately inflated) ``` After: ``` benchmarking normalization of examples/Reducer.hs time 447.0 ms (439.0 ms .. 451.0 ms) 1.000 R² (1.000 R² .. 1.000 R²) mean 454.4 ms (451.0 ms .. 460.9 ms) std dev 6.411 ms (13.17 μs .. 7.496 ms) variance introduced by outliers: 19% (moderately inflated) benchmarking normalization of tests/shouldwork/Basic/AES.hs time 182.2 ms (180.8 ms .. 183.4 ms) 1.000 R² (1.000 R² .. 1.000 R²) mean 185.3 ms (183.9 ms .. 188.1 ms) std dev 2.666 ms (490.4 μs .. 3.715 ms) variance introduced by outliers: 14% (moderately inflated) ``` Fixes #2598
- Loading branch information