https://blog.lordvidex.me.uk/posts/faster-java-algorithms/
Writing faster Java algorithms