Version française
Home     About     Download     Resources     Contact us    
Browse thread
Estimating the size of the ocaml community
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Gerd Stolpmann <info@g...>
Subject: Re: [Caml-list] Estimating the size of the ocaml community

Richard W. M. Jones said:
>> If one wanted really to improve the situation, it would be better to
>> change the representation of strings, and to encode the string length
>> in the first word after the header. This wastes much less memory
>> (except in the special case when you have many small strings), and is
>> probably neutral for the execution speed.
>
> But then you'd need a special case to handle values-containing-
> strings, vs. values-not-containing strings, because you'd always want
> to have the size attribute of the header reflect the size of the data
> in the value.

AFAIK, only the garbarge collector accesses the size attribute in a
generic way. So a special case for strings would be needed. I guess
it is already there, because strings must be handled as opaque data.

Gerd
------------------------------------------------------------
Gerd Stolpmann * Viktoriastr. 45 * 64293 Darmstadt * Germany
gerd@gerd-stolpmann.de          http://www.gerd-stolpmann.de
------------------------------------------------------------