Improved performance

see https://twitter.com/xuwei_k/status/399094961137651713