unpack primitive types by default in data? and NOUNPACK?
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 (closed), #2289
Trac metadata
| Trac field | Value |
|---|---|
| Version | 6.8.2 |
| Type | FeatureRequest |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | Compiler |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | Unknown |
| Architecture | Unknown |