|
|
|
|
|
by lmilcin
2859 days ago
|
|
Hi! I have worked on algorithmic trading framework for third largest Polish brokerage house and I also re-implemented LMAX Disruptor for this project. Actually, allocating and discarding objects is not the problem. Java allocation and deallocation is extremely efficient for short living objects. I would say memory layout, access patters resulting from object orientedness are much more important factor. It is possible to get very close to raw performance, but you have to reinvent almost everything. The code starts looking like plain C very quickly. |
|
But in Java it always seemed that you are very much punished for having data structures that are at cross purposes to your dominant work load. I cut my teeth on implementing the last two parts of “make it work, make it right, make it fast”, often on projects where the existing team had declared that everything that could be done already had been done. There are a lot of refactorings that accomplish both goals, and I often got a 2-3x out of these projects by removing slow tech debt, and more by exposing a real info architecture.
It always surprised me that a language that so punished (especially in the early days where it was interpreted and all object lookups were double indirect) the Big Ball of Mud antipattern exhibited so many examples of it, so frequently.
We can do better. So much better.