Idea: "Explicit" Data Types

Craig Black craigblack2 at cox.net
Wed Apr 2 20:41:03 PDT 2008


"Christopher Wright" <dhasenan at gmail.com> wrote in message 
news:ft1etp$eaj$1 at digitalmars.com...
> Bill Baxter wrote:
>> I'm not voting because it sounds like it solves a problem that I don't 
>> have.  Or else I just haven't understood.  I don't know what stack maps 
>> are, so you kinda lost me on the first sentence.
>>
>> --bb
>
> A stack map is just a data structure (a bitvector, possibly) that records 
> what on the stack is a pointer (and possibly what type of pointer it is). 
> Instead of considering every word-size chunk as a pointer, you can be a 
> lot more precise in garbage collection. And possibly a bit slower, but on 
> the other hand, you might not have to go through as much memory on some 
> collections. So you'll take a small, continual hit for occasional gains in 
> speed and probably frequent gains in memory usage.

I admit I may know less about stack maps than you, but in the few cases I've 
read about them, they always speak of them as having a positive impact on 
performance.  For example, if the GC runs in the middle of a recursive 
function that doesn't use pointers, there would be a big benefit to this.

-Craig 




More information about the Digitalmars-d mailing list