Optmization referenced in discussion in 602118cdfb9f4332dccf5a29df9ab224ea285b3b on github.