Closed purpl3F0x closed 2 weeks ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 89.92%. Comparing base (
fc5b638
) to head (a20e012
).
Eh, i get it but i dont agree with the size_t conversion at all. I prefer int64_t over this. I dont think it's much of a change. Also, the compiler uses 8 bits to check booleans but 32 bits(or 64 in other cases) to check integers if im not wrong, but with the compiler optimizers it is completely the same thing. So why this will be faster?
So why this will be faster?
Vector bool is bitset, each value is 1 bit not 1 byte. https://isocpp.org/blog/2012/11/on-vectorbool.
(Alternatively, valarray
Eh, i get it but i dont agree with the size_t conversion at all. I prefer int64_t over this. I dont think it's much of a change.
I don't think there is a reason the type should be signed, it only limits the range of the results. The function basically gets as an argument the max index of the vector which will return(which is a size_t) and then it does index maths,.all of these are size_t operations. I think the question is, if there is a reason not to be rather than being an int.(Ofc I would like to see one trying to allocate 1.8exabytes of RAM but I think my point is still valid)
Hard coding the size to 64b will, Slow down architectures with words smaller than 64bits (eg ARM). Also possibly produce unwanted behavior, since I can pass 2^42 as an argument but the function will not return a vector of that size.