[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Alternative Hashtbl and lwt yield-like functionality questions



thanks for the idea. Although, I don't think that an array is
appropriate for my problem as I want to have the 0(1) lookup
complexity that the Hashtbl provides. In any case, what I did was to
reduce the size of the experiment. It was though a surprise to me how
inefficient memory-wise is the Hashtbl in comparison to c structures.

On 14 December 2011 14:04, Thomas Gazagnaire
<thomas.gazagnaire@xxxxxxxxx> wrote:
> How long does you test longs ? Do you really want to store your data in a 
> structured way ?
> What you can do to avoid too much allocation during your test is to allocate 
> an array each second (say of size 70K), and once filled, to store it in a 
> mutable list and allocate a new array to continue your test. When you test is 
> finished, you can analyze your mutable list and build your association table 
> using the data-structure you want.



-- 
Charalampos Rotsos
PhD student
The University of Cambridge
Computer Laboratory
William Gates Building
JJ Thomson Avenue
Cambridge
CB3 0FD

Phone: +44-(0) 1223 767032
Email: cr409@xxxxxxxxxxxx



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.