View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000189 | LDMud | LPC Compiler/Preprocessor | public | 2004-11-26 21:28 | 2009-10-27 07:37 |
Reporter | Assigned To | ||||
Priority | normal | Severity | feature | Reproducibility | N/A |
Status | closed | Resolution | won't fix | ||
Summary | 0000189: Tuple datatype | ||||
Description | Short: Two-element datatype From: Daniel von Dincklage <vondincklage@usa.net> Date: Mon, 22 Jun 1998 00:53:36 +0200 Type: Feature State: Unclassified >> - A datatype that stores two values and can be indexed like an array. >> In situations where you need lots of small arrays (with two elements) >> this would save a lot of memory. > > Would a class/struct datatype solve this for you? An array of two-value > structs would probably be just the thing... > > (Yes, I like the name "struct", just because MudOS picked "class". ;-) Well, not really. The whole idea behind that was perfomance and saved memory. Currently, I use arrays with two (or three) members a LOT. I'm not that happy with the fact that the arrays use about twice as much memory as I'd need to store the two items for themselves. Just a memory issue. Maybe a more efficient storage method for arrays would help? No, it wouldn't. Current overhead for arrays is 2 words (3 in DEBUG), plus the malloc overhead which is unavoidable anyway. Minimum overhead would be 1 word + malloc overhead. Hmm, but maybe tuples which are copied by value? Would be a nice complement to structs. | ||||
Tags | No tags attached. | ||||
External Data (URL) | |||||
related to | 0000279 | feedback | Tuple return values |
|
I don't really think, it is worth the effort to create a new optimized datatype especially for this... Memory is cheap. ;-) |
|
Currently, nobody seems to be interested too much in a new datatype. So closing this. |
Date Modified | Username | Field | Change |
---|---|---|---|
2004-11-26 21:28 |
|
New Issue | |
2004-11-27 00:22 |
|
Relationship added | related to 0000279 |
2009-10-02 03:39 | zesstra | Note Added: 0001402 | |
2009-10-02 03:39 | zesstra | Status | new => feedback |
2009-10-27 07:37 | zesstra | Note Added: 0001558 | |
2009-10-27 07:37 | zesstra | Status | feedback => closed |
2009-10-27 07:37 | zesstra | Resolution | open => won't fix |