CoralBits offers high-performance, powerful and easy-to-use libraries to build ultra-low-latency systems that produce zero garbage.
Data Structures
All data structures have garbage-free iterators
Maps:
ByteArrayMap |
Map that uses a byte[] for its keys |
CharSequenceMap |
Map that uses a CharSequence for its keys |
ByteMap |
Map that uses a byte for its keys |
CharMap |
Map that uses a char for its keys |
IntMap |
Map that uses an int for its keys |
LongMap |
Map that uses a long for its keys |
IdentityMap |
Map that uses object identity when comparing keys |
PooledHashMap |
java.util.HashMap fixed not to produce any garbage |
FastIntMap |
A very fast IntMap for when max key is known in advance and it is not so big |
Sets:
ByteArraySet |
Set of byte[]s |
LongSet |
Set of longs |
IntSet |
Set of ints |
PooledHashSet |
java.util.HashSet fixed not to produce any garbage |
IntChecker |
A fast and clean bounded set for integers |
IdentitySet |
A set that uses object identity when comparing keys |
Lists:
ObjectLinkedList |
Double linked-list of Objects |
CharSequenceList |
List of CharSequences |
CircularLongList |
List of longs backed up by a circular array |
CircularQueue |
A fast and clean circular array implementation |
IntList |
List of ints |
LongList |
List of longs |
ObjectList |
List of objects |
ObjectLinkedList |
A fast and clean double-linked list that exposes its entries |
PooledLinkedList |
java.util.LinkedList fixed not to produce any garbage |
SortedLongList |
Sorted list of longs |
Pools:
CircularObjectPool |
Object pool backed up by a circular array (fixed size) |
LinkedObjectPool |
Object pool backed up by a linked list (dynamic size) |
ResettableObjectPool |
Object pool that can reclaim all objects very fast |
Garbage Collector Utilities
MemorySampler |
Check memory allocated by the VM around any block of code |
GarbageCollector |
Synchronous and predictable GC |
GCSampler |
Check memory collected by the GC around any block of code |
Memory Allocation
HeapMemory |
Allocates chunks of memory in the Java heap |
DirectMemory |
Allocates chunks of native memory (off-heap) |
MMapMemory |
Allocates chunks of memory through a memory-mapped file off-heap |
Timestampers
SystemMillisecondTimestamper |
Uses System.currentTimeMillis() (millisecond precision – realtime) |
SystemNanosecondTimestamper |
Uses System.nanoTime() (nanosecond precision – monotonic) |
RdtscTimestamper |
Uses native rdtsc() syscall (nanosecond precision – monotonic) |
SysTimeTimestamper |
Uses native clock_gettime() syscall (nanosecond precision – monotonic and realtime) |
Benchmarks
Benchmarker |
Benchmark with average, minimum and maximum time |
DetailedBenchmarker |
Detailed benchmark with avg, min, max, percentiles, standard deviation and more |
Utilities
AccessorUtils |
Reflection utilities |
ByteArrayUtils |
Parser plus various utilities for working with byte[]s |
ByteBufferUtils |
Parser plus various utilities for working with ByteBuffers |
ByteUtils |
Various utilities for working with bytes |
CharUtils |
Various utilities for working with chars |
DateTimeUtils |
Various utilities for working with date and time |
DoubleUtils |
Various utilities for working with doubles |
ExceptionUtils |
Various utilities for working with exceptions |
IOUtils |
Various utilities for working with I/O |
MathUtils |
Various utilities for working with math |
NumberUtils |
Various utilities for working with numbers |
OSUtils |
Operating System utilities |
RegexUtils |
Various utilities for working with regular expressions |
ShutdownHook |
Various utilities for working with shutdown hooks |
StringUtils |
Various utilities for working with strings |
SystemUtils |
Various utilities for working with system properties |
Others
CheapDataTimeFormatter |
Formats a timestamp (epoch) into a Date/Time char sequence without producing garbage |
CheapDataTimestamperParser |
Parses a Date/Time from a ByteBuffer into an epoch timestamp without producing garbage |
And much more…