proj-plbook-plChOptimizationImpl

Table of Contents for Programming Languages: a survey

 Since you mentioned escape analysis: would it be possible to optimize x ++ y to avoid copying of x (just change the last tail pointer to point to y), if x is not used anywhere else? Does GHC do this?    Roman Cheplyaka Feb 27 '11 at 13:47

@Roman: No, GHC's escape analysis only applies to local let-bindings. There is no interprocedural analysis going on. For your example, you'd need to statically ensure that there is no other pointer anywhere in the heap that points to x or any of its successors. You'd need linear or uniqueness types to prove something like that. nominolo Feb 27 '11 at 14:00

-- http://stackoverflow.com/questions/5132350/how-do-haskell-compilers-decide-whether-to-allocate-on-the-heap-or-the-stack#comment5759432_5132862

https://en.wikipedia.org/wiki/Hash_consing

https://shipilev.net/jvm-anatomy-park/

https://www.microsoft.com/en-us/research/wp-content/uploads/2016/07/hoopl-haskell10.pdf

---

"some keywords to get you started are “constant propagation”, “common subexpression elimination”, “loop invariant code motion”, “global value numbering”, “strength reduction”, “scalar replacement of aggregates”, “dead code elimination”, and “loop unrolling”." -- [1]

---

the "performance" section of this blog post talks about some late-stage language optimizations that were particularly helpful for one application:

https://blogs.msdn.microsoft.com/dotnet/2018/08/20/bing-com-runs-on-net-core-2-1/

---

Links:

---