> Are you saying that correctness is unimportant?

No, that's not what I'm saying (or at least what I mean). I say that `std::vector::size_type` is the same as `size_t` in all known implementations and that it would not make a difference in practice. Also, the only impact `std::vector::size_type != size_t` would have is that some pathetic cases (negative values for size() anyone? or that `std::vector::size_type` can represent less values than `size_t` because `size_t` must be large enough to represent all valid addresses of single-byte objects.) which we should not worry about anyways. In this particular case, it is even very likely that using `unsigned short` for the loop counter would be unnoticed because there are rarely tables with more than 65536 entries...

> but I really don't think we should rely on that fact.

as I said above, even if the types are not the same, @atgeirr's code is still correct. (maybe the register which contains `j` must be a few bits wider than necessary, but there should be no averse effects.)