[issue31377] remove *_INTERNED opcodes from marshal

2018-07-11 Thread INADA Naoki
INADA Naoki added the comment: I doubt that interning cause reproduciblity problem. AFAIK, all strings in code object are interned or not interned deterministically. https://bugzilla.opensuse.org/show_bug.cgi?id=1049186 This issue seems be caused by w_ref() based on object refcnt, not interni

[issue31377] remove *_INTERNED opcodes from marshal

2017-09-07 Thread Benjamin Peterson
Benjamin Peterson added the comment: On Thu, Sep 7, 2017, at 09:46, INADA Naoki wrote: > > INADA Naoki added the comment: > > > We end up interning each reference individually currently. > > But interning interned string is much faster. It only checks flag. > Interning normal string requires d

[issue31377] remove *_INTERNED opcodes from marshal

2017-09-07 Thread INADA Naoki
INADA Naoki added the comment: > We end up interning each reference individually currently. But interning interned string is much faster. It only checks flag. Interning normal string requires dict lookup. -- ___ Python tracker

[issue31377] remove *_INTERNED opcodes from marshal

2017-09-07 Thread Benjamin Peterson
Benjamin Peterson added the comment: On Thu, Sep 7, 2017, at 01:17, INADA Naoki wrote: > > INADA Naoki added the comment: > > w_ref() depends on refcnt already. > I don't think removing *_INTERN opcode makes PYC reproducible. > https://github.com/python/cpython/blob/1f06a680de465be0c24a78ea3b61

[issue31377] remove *_INTERNED opcodes from marshal

2017-09-07 Thread INADA Naoki
INADA Naoki added the comment: w_ref() depends on refcnt already. I don't think removing *_INTERN opcode makes PYC reproducible. https://github.com/python/cpython/blob/1f06a680de465be0c24a78ea3b610053955daa99/Python/marshal.c#L269-L271 I think "intern one string, then share it 10 times" is faste

[issue31377] remove *_INTERNED opcodes from marshal

2017-09-06 Thread Benjamin Peterson
Benjamin Peterson added the comment: Used but not really supported. Anyway, I doubt intern round-tripping is a particularly important. -- ___ Python tracker ___

[issue31377] remove *_INTERNED opcodes from marshal

2017-09-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Marshal is used not only in pyc files. It is used for fast data serialization, faster than pickle, json, etc. -- nosy: +serhiy.storchaka ___ Python tracker _

[issue31377] remove *_INTERNED opcodes from marshal

2017-09-06 Thread Benjamin Peterson
New submission from Benjamin Peterson: The *_INTERN opcodes inform the marsahl reader to intern the encoded string after deserialization. I believe for pycs this is pointless because PyCode_New ends up interning all strings that are interesting to intern. Writing this opcodes makes pycs non-de