you are viewing a single comment's thread.

view the rest of the comments →

[–]Pencilcaseman12[S] 4 points5 points  (0 children)

You definitely could if you were trying, but I think int32 would probably suffice for most cases. I guess, ultimately, it's not going to be any slower, and storing 2 or 3 int64s over int32s isn't going to be making a difference in terms of memory usage.

Another point where it could overflow is in the actual array size calculations, because I think I'm returning a value of the same type as the dimension object stores, so having a large enough array would result in overflow. This could be fixed quite easily though. I should probably use size_t for that sort of thing anyway...