Comment Comment by flerchin Alternatively, it can be solved at compile time with the streams api long start = System.currentTimeMillis(); long count = IntStream.rangeClosed(Float.floatToIntBits(0.0f), Float.floatToIntBits(1.0f)).count(); System.out.println(count); System.out.println((System.currentTimeMillis() - start) + "ms"); 1065353217 0ms parent flerchin 3 years ago