[issue12744] inefficient pickling of long integers on 64-bit builds

2011-08-13 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +alexandre.vassalotti

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12744
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12744] inefficient pickling of long integers on 64-bit builds

2011-08-13 Thread Roundup Robot

Roundup Robot devn...@psf.upfronthosting.co.za added the comment:

New changeset 8e824e09924a by Antoine Pitrou in branch 'default':
Issue #12744: Fix inefficient representation of integers
http://hg.python.org/cpython/rev/8e824e09924a

--
nosy: +python-dev

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12744
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12744] inefficient pickling of long integers on 64-bit builds

2011-08-13 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
resolution:  - fixed
stage: needs patch - committed/rejected
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12744
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12744] inefficient pickling of long integers on 64-bit builds

2011-08-13 Thread Raymond Hettinger

Raymond Hettinger raymond.hettin...@gmail.com added the comment:

Nice.

--
nosy: +rhettinger

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12744
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12744] inefficient pickling of long integers on 64-bit builds

2011-08-12 Thread Antoine Pitrou

New submission from Antoine Pitrou pit...@free.fr:

On a 64-bit Linux machine (where C `long` is 64 bits):

 len(pickle.dumps(2**30))
8
 len(pickle.dumps(2**31))
16
 len(pickle.dumps(2**62))
25
 len(pickle.dumps(2**63))
14

This is because the old text protocol is used when the integer can fit in a C 
long but not in 4 bytes:

 pickletools.dis(pickle.dumps(2**62))
0: \x80 PROTO  3
2: LLONG   4611686018427387904
   24: .STOP
highest protocol among opcodes = 2
 pickletools.dis(pickle.dumps(2**63))
0: \x80 PROTO  3
2: \x8a LONG1  9223372036854775808
   13: .STOP
highest protocol among opcodes = 2

--
components: Library (Lib)
messages: 141971
nosy: pitrou
priority: normal
severity: normal
status: open
title: inefficient pickling of long integers on 64-bit builds
type: resource usage
versions: Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12744
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12744] inefficient pickling of long integers on 64-bit builds

2011-08-12 Thread Meador Inge

Changes by Meador Inge mead...@gmail.com:


--
nosy: +meador.inge

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12744
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12744] inefficient pickling of long integers on 64-bit builds

2011-08-12 Thread Meador Inge

Changes by Meador Inge mead...@gmail.com:


--
stage:  - needs patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12744
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com