Changes between Initial Version and Version 2 of Ticket #8326
 Timestamp:
 Sep 19, 2013 10:16:15 AM (23 months ago)
Legend:
 Unmodified
 Added
 Removed
 Modified

Ticket #8326 – Description
initial v2 97 97 2. if we have two alternatives, one of which allocates heap and the other does not, we should place the heap check only in the alternative that allocates the stack. This will solve #1498. 98 98 3. it is not clear to me what to do if we have combination of the above (more than one branch that allocates heap and at least one branch that does not). If we place heap check before the `case` expression we lose optimization of recursive functions and face the problem described in #1498. If we push heap checks into branches that allocate heap then we get code duplication, i.e. the problem that we're addressing in this ticket. I guess the only way to make correct decission here is to try different aproaches and measure their performance. 99 100 This ticket is mentioned [http://ghc.haskell.org/trac/ghc/wiki/PrimBool#Implementationdetails on this wiki page] and in the source code in Note [Optimizing isTrue#] in ghcprim. Once this ticket is resolved we need to update these places accordingly.