Add timing of various cases and implement use of long instead of int