News for hackers. Stuff that matters.
Re:Records: Python library for making raw SQL queries to Pos... by tveita on Monday February 08, 2016 @08:23AM (#11057897)
Pickling, for one.

  >>> nt = namedtuple('nt', 'a b')
  >>> nt10k = [nt(1, 2) for i in range(10000)]
  >>> dict10k = [{'a':1, 'b':2} for i in range(10000)]
  >>> timeit pickle.dumps(nt10k)
  10 loops, best of 3: 26.3 ms per loop
  >>> timeit pickle.dumps(dict10k)
  100 loops, best of 3: 2.49 ms per loop

There are no comments on this comment yet.