Optimized code is rarely a direct translation from Java. C++ provides you access to a new world with SIMD, optimized allocators, cache-aware memory layouts, etc.
Performance should be part of the design, not something you pop in as an afterthought by micro-optimizations.
Performance should be part of the design, not something you pop in as an afterthought by micro-optimizations.