The following instance is added 4.000.000 times to the offheap. Each object added to the heap can have a tag. The tag can be used to retrieve an object faster, because with 'tag-iteration' only the tag gets decoded. With full iteration, all 4 million objects get decoded during iteration.
public static class ExampleOrder implements Serializable {
String product = "ALV";
long contract = 28374645556l;
char buySell = 'B';
int qty = 1000;
double limit = 22.545;
String text = "Bla bla bla Bla";
String member = "CBKFR";
String owner = "XYZEXTRD013";
byte restriction = 1;
byte type = 3;
Date validity = new Date();
}
thereafter the offheap is iterated (single/multithreaded) by tag and by element.
██████████████████████▌ add ExampleOrder (objects/s) (2266000) |
████████████████████████████████████████████████████████████▌ search tag based (objects/s) (6069000) |
█████████████████████ iterate ExampleOrder (objects/s) (2119000) |
█████████████████████████████████████████████████████████▌ 4 thread concurrent search tag based (objects/s) (5751000) |
████████████████████████████████████████████████████ 4 thread concurrent iterate ExampleOrder (objects/s) (5218000) |