Skip to content

Conversation

@methane
Copy link
Member

@methanemethane commented Jul 16, 2018

marshal used refcnt() to decide use FLAG_REF or not. Even when one object is used only once in marshled object, FLAG_REF could be used. This commit makes marshal two-pass. It counts refs at first pass. In second pass, mashal objects and use FLAG_REF only when the object is used more than twice.
@methane
Copy link
MemberAuthor

I don't like the option name stable, because it is very unclear what is stable.
It just helps reproducible pyc build.

@ericsnowcurrently
Copy link
Member

Wow, this is very similar to a PR I made for the same problem (before you pointed me here): gh-28379. The biggest difference is that I literally call w_object() twice, where the first pass determines how many times an object is used (and the result bytes are discarded).

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@methane@ericsnowcurrently@the-knights-who-say-ni@bedevere-bot