performance improvements the Promises$reduce state machine