Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Nov 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    HashMap vs Berkely DB

    Hi folks,

    I am using a HashMap<String, String> to store lots of entries. For example, each entry will cost less 700 bytes so that storing 600,000 entries will take about 400,000 kilobytes memory, fair enough. But I wonder Berkel DB will use less memory and faster with this much of data. Any input will help!

    Thanks!

  • #2
    Senior Coder shyam's Avatar
    Join Date
    Jul 2005
    Posts
    1,563
    Thanks
    2
    Thanked 163 Times in 160 Posts
    its hard to guess without any concreted data. the best course to take would be to profile both the hashmap and bdb solution and pick the one that performs best. let us know how it goes though
    You never have to change anything you got up in the middle of the night to write. -- Saul Bellow


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •