Marko experimented in the linked PR and all the experiments were slower than the original. So let's keep the original code as is.