On Mar 5, 3:28 am, Mark Engelberg <mark.engelb...@gmail.com> wrote: > 3. What would you predict to be the most efficient way to implement a > (non-destructive) double-dimensioned array?: > a) A vector of vectors. > b) A hash map that correlates [i j] pairs with values. > c) A flat vector, and write lookup and assoc functions that use > i*columns+j as the index.
I'm guessing (a) for small, non-sparse vectors, (b) for large, sparse vectors, and (c) for large, non-sparse vectors. Totally untested, unverified, and unsubstantiated. :) -Stuart Sierra --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---