Nick Krempel (2014-02-22T03:50:49.000Z)
domenic at domenicdenicola.com (2014-03-02T22:42:42.149Z)
A sparse array is useful whenever the index represents an externally meaningful piece of data (like an ID). This use case could be replaced with a Map which just uses integer keys, but I believe JavaScript engines are better optimized working with Arrays here, where the keys are known to be integers. So in some cases when you care about performance, you may want to use a sparse array. (For some JavaScript engines and some ranges of array size you may in fact be better off with a dense array for performance, even if it means spending time filling it with undefined. That may not be an option if 'undefined' is a meaningful value differing from missing.)