Improve branch prediction in extract_edit_data. The function uses many
branches that can reduce the branch prediction.
This patch replaces most of the branches with a branchless
implementation. It also moves some inner loop initialization to the
outer loop.
Although this is faster it isn't the real bottleneck like T88456, T88457.