We don't have the case of integer div. And if you take a look into the coolsize() func we don't re-compute the factor. So it's not very significant.
To get the size of a file we multiply only once with this factor.
What is significant is the while() loop where the iterations increase with the file size. There's no mul or div in it giving the API a reasonable performance benefit.
- intel Broadwell: 64-bit integer div is fastest, float div is 69% slower, float mul is 50% slower;
- AMD Ryzen: 64-bit integer div is fastest, float div is 47% slower, float mul is 60% slower;
- ARM11 (Raspberry Zero): 64-bit integer div is fastest, float div is 138% slower, float mul is 159% slower.
quick-and-dirty test used: https://pastebin.com/raw/4XqnuXL5