Message187516
> Memoization consumes memory during pickling. For now every memoized > object requires memory for: > > dict's entity; > an id() integer object; > a 2-element tuple; > a pickle's index (an integer object). > > It's about 80 bytes on 32-bit platform (and twice as this on 64-bit). As far as I understand, Alexandre doesn't propose to suppress memoization, only to make it implicit. Therefore the memory overhead would be the same (but the pickle would have less opcodes). > For data which contains a lot of floats it can be cumbersome. Apparently, floats don't get memoized: >>> pickletools.dis(pickle.dumps([1.0, 2.0])) 0: \x80 PROTO 3 2: ] EMPTY_LIST 3: q BINPUT 0 5: ( MARK 6: G BINFLOAT 1.0 15: G BINFLOAT 2.0 24: e APPENDS (MARK at 5) 25: . STOP | |
| Date | User | Action | Args | | 2013-04-21 17:19:06 | pitrou | set | recipients: + pitrou, alexandre.vassalotti, asvetlov, serhiy.storchaka | | 2013-04-21 17:19:06 | pitrou | link | issue17810 messages | | 2013-04-21 17:19:05 | pitrou | create | | |