isolate units of work/logic to prevent deopts in merge and its variants

in progress
is the performance gain measurable? if not, then i'd prefer to not make changes that make the code more convoluted.