Javascript Map() most performant way to create usable keys from [int, int]
Javascript Map()s compare object keys by identity, which means Map<[number, number], any> is a bad idea: const map = new Map(); const coordinates = [1, 3]; map.set(coordinates, 0); map.get([1, 3]); # undefined To avoid this, we commonly see keys set…