Subj : Re: using/storing hashtables? To : netscape.public.mozilla.jseng From : Benjamin Smedberg Date : Thu Aug 07 2003 09:59 pm Ari wrote: > Hi, I am just getting started on my first Mozilla extension and will > need a big hashtable to store a bunch of information. I also will > need to save this table over multiple sessions. I think you need to divide your task into several different parts; I don't know your precise needs, but something like this: 1) at runtime, I need a high-performance data structure to store key/data pairs, with 20,000 elements 2) I need to be able to save and restore this information 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++. In terms of persistence, you can use the mozilla file streams to read and write data to disk. 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. --BDS .