Subj : Re: using/storing hashtables? To : netscape.public.mozilla.jseng From : Brendan Eich Date : Thu Aug 07 2003 08:19 pm Benjamin Smedberg wrote: > You don't give some important details that would be very helpful for > answering your question, such as: what kind of data is in your > hashtable (numeric, string, structured, or complex object data). Do > you have any particular persistence format in mind? > > JavaScript is a great language, and it may suit your purposes, but a > dataset of this size may be better implemented in C++. That's not clear just from the 20,000 element figure given. If the keys and values are numbers or strings, then JS can be competitive in time, and space on modern desktops (it will use more space than a tuned C++ implementation, but not enough to matter). I can compute the space overhead, given some more information of the kind Benjamin asked for. > In terms of persistence, you can use the mozilla file streams to > read and write data to disk. All scriptable enough, as well as C++ callable. > I am certain that all of the "pieces" are there in the mozilla > codebase for you to use; if you are more specific about your > requirements I am sure people can help you decide whether JS alone can > suit your needs, or whether you need a C++ solution. Right. /be .