I like the discussion this has spawned, lol. Maybe someone can move this thread to Discussion?
I agree on that memory is cheap and it should be the last thing we aim to optimize.
For the record, my implementation does use a 3 dimentional array, which is only as big as the offset of the minimum coordinates and the maximum coordinates found on all sector files. My tile lookup is O(1), but the cost of that is 4gb-ish in memory (tiles with saved player items) of the original tibia 7.7 map.
I agree on that memory is cheap and it should be the last thing we aim to optimize.
For the record, my implementation does use a 3 dimentional array, which is only as big as the offset of the minimum coordinates and the maximum coordinates found on all sector files. My tile lookup is O(1), but the cost of that is 4gb-ish in memory (tiles with saved player items) of the original tibia 7.7 map.