Skip to content

Conversation

@methane
Copy link
Member

@methane methane commented Jul 16, 2018

methane added 2 commits July 10, 2018 22:19
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
Member Author

methane commented Jul 16, 2018

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 free to 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