Re: what's better way to store a million keys in mem?




I'd give a real database a try for this. There is of course a bit of
overhead, but you use a lot less memory and I guess it will also be
faster. Of course, you should benchmark and compare any solutions
suggested.

I also think that you should use a database. You can use a ORM (Object-Relation Mapping) like the javax.persistence API of JEE5 or hibernate directly, for example.
.



Relevant Pages

  • Re: How come Ada isnt more popular?
    ... In an imperative language like Ada, ... > overhead from features that you don't use). ... bound or manually managed memory allocated outside the GC'ed heap. ... I can imagine to allocate some memory in a special, ...
    (comp.lang.ada)
  • Re: find -exec surprisingly slow
    ... > somewhere in the vicinity of 400K files in it. ... The overhead for starting new ... There is however an upper limit to how much memory will be used ...
    (freebsd-questions)
  • Re: JRuby disabling ObjectSpace: what implications?
    ... it depends on the overhead and on the invocation model. ... sound more like there is one JVM for JRuby programs... ... the way they do (object references are no pointers to memory locations). ... You just traverse the list ...
    (comp.lang.ruby)
  • Re: [Patch 0/9] Performance
    ... Do you have any benchmark numbers with this patch applied and with it ... transaction processing benchmarks indicate that overhead ... ctxsw ctxsw ctxsw ctxsw ctxsw ctxsw ctxsw ... File & VM system latencies in microseconds - smaller is better ...
    (Linux-Kernel)
  • Re: Another New Hardware Thought
    ... which adds data copy, interrupt, and context switching overhead. ... memory manager would become complex enough to be half an OS in its own ... On a machine with 4mb of RAM, ... Then you have the realtime cost of swapping itself, ...
    (comp.sys.apple2)