**Treeform** \- brilliant advice - I'd never have gotten to such an effective 
solution on my own.

For 1.5 million records to and from HDD on my HP Z600 Win 10 Pro workstation, 
the average benchmarks were:

  * Json serialisation: 11.6 secs
  * Flatty serialisation: 1.7 secs
  * Flatty+Snappy serialisation: 0.26 secs



File sizes: 67 megs / 48 megs / 2 megs

Standard deviation is low.

Switching to SSD made surprisingly little difference.

So - 45x speedup on naive Json serialisation! That's got to be a result. Good 
enough to be getting on with - any additional work would be premature 
optimisation, I think.

And thanks for your libs - a lot of work, I know, and much appreciated!

**Planetis** \- I did look at bingo, but being a bear of little brain I 
struggled to understand the chaining in the "next" value and how that would 
work with a long seq. If you were kind enough to provide a more complete 
example I'd certainly give it a try, though Treeform's solution is looking 
pretty good right now.
    
    
    type
      Foo = ref object
        value: int
        next: Foo
    
    let d = Foo(value: 1, next: Foo(value: 2, next: nil))
    
    
    Run

Reply via email to