anchor.diff:              let tp = TuplePickler.Create<'K,'V>(kp, vp)
   
               let writer (w : WriteState) (tag : string) (d : Dictionary<'K,'V>) =
  +                let count = d.Count
                   w.Formatter.WriteInt32 "count" d.Count
  -                w.Formatter.BeginWriteObject "keyvals" ObjectFlags.IsSequenceHeader
  -                for e in Seq.map (fun (KeyValue (k,v)) -> k,v) d do tp.Write w "entry" e
  -                w.Formatter.EndWriteObject ()
  +                let kvs = Seq.map (fun (KeyValue (k,v)) -> k,v) d
  +                writeBoundedSequence tp count w "items" kvs
   
               let reader (r : ReadState) (tag : string) =
  -                let d = new Dictionary<'K,'V>()
                   let count = r.Formatter.ReadInt32 "count"
  -                let _ = r.Formatter.BeginReadObject "keyvals"
  -                for i = 1 to count do
  -                    let k,v = tp.Read r "entry"
  -                    d.Add(k,v)
  -
  -                r.Formatter.EndReadObject()
  -                d
  +                let dict = new Dictionary<'K,'V> (count)
  +                let items = readBoundedSequence tp count r "items"
  +                for k,v in items do dict.Add(k,v)
  +                dict
   
               CompositePickler.Create<_>(reader, writer, PicklerInfo.Combinator, cacheByRef = true, useWithSubtypes = false)
   
  
positive.code:         static member Create<'T when 'T : comparison>(ep : Pickler<'T>) =
              let writer (w : WriteState) (tag : string) (set : Set<'T>) =
                  let formatter = w.Formatter
                  formatter.WriteInt32 "count" set.Count
                  formatter.BeginWriteObject "elements" ObjectFlags.IsSequenceHeader
                  for e in set do ep.Write w "elem" e
                  formatter.EndWriteObject ()
  
              let reader (r : ReadState) (tag : string) =
                  let formatter = r.Formatter
                  let count = formatter.ReadInt32 "count"
                  let array = Array.zeroCreate<'T> count
                  let _ = formatter.BeginReadObject "elements"
                  for i = 0 to array.Length - 1 do array.[i] <- ep.Read r "elem"
                  formatter.EndReadObject ()
                  
                  Set.ofArray array
  
              CompositePickler.Create<_>(reader, writer, PicklerInfo.Combinator, cacheByRef = true, useWithSubtypes = false)
              
  
negative.code:             let tp = TuplePickler.Create<'K,'V>(kp, vp)
              
              let writer (w : WriteState) (tag : string) (map : Map<'K,'V>) =
                  let count = map.Count
                  w.Formatter.WriteInt32 "count" count
                  writeBoundedSequence tp count w "items" <| Map.toSeq map
  
              let reader (r : ReadState) (tag : string) =
                  let count = r.Formatter.ReadInt32 "count"
                  let items = readBoundedSequence tp count r "items"
                  Map.ofArray items
  
              CompositePickler.Create<_>(reader, writer, PicklerInfo.Combinator, cacheByRef = true, useWithSubtypes = false)
  
  