Casting with int instead of intval

Using `(int)` instead of `intval()` is much faster.
This PR also allows to skip the use of `floor()`
See benchmark : https://gist.github.com/lucasmichot/89a18524e10e2af42de3/revisions