ENH: avoid branch in thousands check. Thanks to @cancan101