View Issue Details

IDProjectCategoryView StatusLast Update
0000189LDMudLPC Compiler/Preprocessorpublic2009-10-27 07:37
ReporterlarsAssigned To 
PrioritynormalSeverityfeatureReproducibilityN/A
Status closedResolutionwon't fix 
Summary0000189: Tuple datatype
DescriptionShort: 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.
TagsNo tags attached.
External Data (URL)

Relationships

related to 0000279 feedback Tuple return values 

Activities

zesstra

2009-10-02 03:39

administrator   ~0001402

I don't really think, it is worth the effort to create a new optimized datatype especially for this... Memory is cheap. ;-)

zesstra

2009-10-27 07:37

administrator   ~0001558

Currently, nobody seems to be interested too much in a new datatype. So closing this.

Issue History

Date Modified Username Field Change
2004-11-26 21:28 lars New Issue
2004-11-27 00:22 lars 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