Giter Site home page Giter Site logo

binlijin / binaryoffheaphashmap Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cfelde/binaryoffheaphashmap

0.0 2.0 0.0 36 KB

A hashmap implementation for Java that stores map entries off-heap

License: GNU Lesser General Public License v3.0

Java 100.00%

binaryoffheaphashmap's Introduction

Binary off-heap hashmap for Java 8

The BOHMap is a hashmap implementation for Java 8 that uses off-heap memory for storing map entries (both key and value).

This allows the map to grow past the available JVM heap space, and at the same time will not impose any significant GC cost for the entries stored in the map. Essentially you can have millions of entries on a very small JVM heap.

It has no external third-party library dependencies, and is 100% Java code, i.e., no native code needed.

The B in BOHMap stands for binary; All keys and values must be in binary form. In order to make it more user friendly from a POJO standpoint, a small serialization wrapper is also made available. This wrapper, called OHMap, will benefit from the same off-heap nature of BOHMap but will allow you to use any serializable Java object as both key and value.

By default the OHMap will use standard Java serialization via ObjectOutputStream and ObjectInputStream, but this can be substituted by any serialization framework of your choice.

A set of tests are also included, but if they’ve missed any use cases and you find a bug, please let me know, thanks.

I've put together a short blog post with some performance numbers: http://blog.cfelde.com/2014/04/only-the-good-die-young-or-move-off-heap/

binaryoffheaphashmap's People

Contributors

cfelde avatar vkazanov avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.