Message413615
The patch in PR31448 delays the creation of an implicit block to when it is needed (do if we begin using another block before a new instruction is added, the implicit block is never created).
I counted how many empty blocks are being detected by the optimizer during "python -m test" and this number went down from 41798 (for main) to 35405 (for my PR), which shows that it is not only a theoretical possibility but actually happens. It would be things like:
NEXT_BLOCK()
VISIT_SEQ(c, stmt, s->v.Try.orelse);
compiler_use_next_block(c, end);
where the orelse block is empty.
In summary, the patch simplifies the code as well as making it more efficient. |
|
Date |
User |
Action |
Args |
2022-02-20 23:06:31 | iritkatriel | set | recipients:
+ iritkatriel |
2022-02-20 23:06:31 | iritkatriel | set | messageid: <1645398391.66.0.675925829253.issue46808@roundup.psfhosted.org> |
2022-02-20 23:06:31 | iritkatriel | link | issue46808 messages |
2022-02-20 23:06:31 | iritkatriel | create | |
|