Message366593
| Author |
Mark.Shannon |
| Recipients |
Mark.Shannon, carljm, corona10, dino.viehland, eelizondo, gregory.p.smith, nascheme, pablogsal, pitrou, shihai1991, steve.dower, tim.peters, vstinner |
| Date |
2020年04月16日.12:15:10 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1587039311.36.0.0615666056862.issue40255@roundup.psfhosted.org> |
| In-reply-to |
| Content |
A big -1 to this.
You are asking the whole world to take a hit on both performance and memory use, in order to save Instagram memory.
The PR uses the term "immortal" everywhere. There is only one reference to copy-on-write in a comment. Yet this issue about making object headers immutable.
Immortality and object header immutability are not the same.
If object header immutability is to be a requirement, that needs a PEP.
If it is not requirement, but immortality is, then make the obvious improvement of changing the branchy code
if (!(obj->refcnt & IMMORTAL_BIT)) {
obj->refcnt++;
}
to the branchless
obj->refcnt += ((obj->refcnt &IMMORTAL_BIT) != 0)
Immortality has advantages because it allows saturating reference counting and thus smaller object headers, but it is not the same as making the object header immutable. |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2020年04月16日 12:15:11 | Mark.Shannon | set | recipients:
+ Mark.Shannon, tim.peters, nascheme, gregory.p.smith, pitrou, vstinner, carljm, dino.viehland, steve.dower, corona10, pablogsal, eelizondo, shihai1991 |
| 2020年04月16日 12:15:11 | Mark.Shannon | set | messageid: <1587039311.36.0.0615666056862.issue40255@roundup.psfhosted.org> |
| 2020年04月16日 12:15:11 | Mark.Shannon | link | issue40255 messages |
| 2020年04月16日 12:15:10 | Mark.Shannon | create |
|