Faster ceil implementation.