From cc56cec11a0586c9f2673c8d59fa3fc6d07e1d8f Mon Sep 17 00:00:00 2001 From: Victor Porof Date: Thu, 2 Feb 2017 16:15:25 +0100 Subject: [PATCH] Add note about linked lists data type choice for edn::Value --- edn/src/types.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/edn/src/types.rs b/edn/src/types.rs index ea983ec1..feb96f63 100644 --- a/edn/src/types.rs +++ b/edn/src/types.rs @@ -33,6 +33,9 @@ pub enum Value { Keyword(symbols::Keyword), NamespacedKeyword(symbols::NamespacedKeyword), Vector(Vec), + // We're using a LinkedList here instead of a Vec or VecDeque because the + // LinkedList is faster for appending (which we do a lot of). + // See https://github.com/mozilla/mentat/issues/231 List(LinkedList), // We're using BTree{Set, Map} rather than Hash{Set, Map} because the BTree variants // implement Hash. The Hash variants don't in order to preserve O(n) hashing