Casting to int ahead of time