#2338: unpack primitive types by default in data? and NOUNPACK?
--------------------------------+-------------------------------------------
Reporter: Isaac Dupree | Owner:
Type: feature request | Status: new
Priority: normal | Component: Compiler
Version: 6.8.2 | Severity: normal
Keywords: | Testcase:
Architecture: Unknown | Os: Unknown
--------------------------------+-------------------------------------------
We should have a NOUNPACK pragma paralleling UNPACK so that we can unpack
data types by default without completely taking away control from the
programmer. (Currently, NOUNPACK would only have any effect when
`-funbox-strict-fields` is given.)
We may want to unpack strict primitive types by default (at least with
-O), such as in the following
{{{
data D a = D !Int !Double
}}}
(Because those are the types that it's most often useful to pass around in
registers, for one thing?)
But it's probably worth testing on a lot of existing code to make sure
it's never too much of a penalty in practice. (But considering the amount
that people just use `-funbox-strict-fields` without thinking, because
having to place all those UNPACK pragmas is annoying, making the default
be a little smarter is probably useful.)
see parts of this thread:
http://thread.gmane.org/gmane.comp.lang.haskell.cafe/40294/focus=40316
related tickets, in order of decreasing relatedness: #605, #1349; #1433,
#2289
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2338>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs