bpo-44945: Specialize BINARY_ADD by markshannon · Pull Request #27967 · python/cpython
Feel free to ignore, but you can reorder this to
PyUnicode_Append(&SECOND(), right);
STACK_SHRINK(1);
Py_DECREF(right);
Py_DECREF(left);
if (TOP() == NULL) {
goto error;
}
Then if you'd like, you can factor out the code from STACK_SHRINK(1); onwards into a BINARY_ADD_FOOTER macro, and reuse that for all BINARY_ADD_* instructions.