Common misconception: How many objects does this create?
A common question is how many objects or how many Strings does a section of code create. Often the answer is not what you think nor should you really need to know. It is useful to have an idea of when an object is created but there is so many other factors which are often far more important to consider which can mean the total number for an application is not what you think. String is a not a single object
An introduction to optimising a hashing strategy
The strategy that’s used for hashing keys, can have a direct impact on the performance of a hashed collections such as a HashMap or HashSet. The built-in hashing functions are designed to be generic and work well in a wide range of use cases. Can we do better, especially if you have a good idea of the use case?
Low latency FIX engine in Java
Chronicle FIX is our Low Latency FIX engine and database for Java. What makes it different is that it;
- is designed for ultra low GC* in Java.
- supports Strings and date times in a way which minimises garbage and overhead.
- is customisable to include only the fields you expect.
- uses optimisations normally used in binary parsers and generators such as reading/writing 4 or 8 bytes at a time to improve efficiency.
- built on low latency persistence to minimise the latency of logging.
- is optimised for low latency network cards such as Solarflare.
Java 8 Optional nu este doar pentru înlocuirea unei valori null
În Java 8 poți returna un Optional în loc de return null așa cum ai putea să faci în Java 7. Aceasta ar putea sau nu să fie o mare diferenţă în funcţie de frecvenţa cu care tinzi să uiţi să verifici null sau să foloseşti analiza de cod static pentru a verifica referinţele de null. Există totuși un caz care te constrânge mai mult. Acesta constă în a trata Optional ca pe un Stream cu valori 0 sau 1.