With the dm-verity hash tree format, each digest is salted, meaning it first hashes the salt byte string and then the actual data. Previously, the salt was being rehashed for each digest operation. Instead, the salted SHA-256 context can be computed once and then cloned when needed.
The performance improvement is pretty minor, but it's worth doing anyway since it's not any more complex.
With the dm-verity hash tree format, each digest is salted, meaning it first hashes the salt byte string and then the actual data. Previously, the salt was being rehashed for each digest operation. Instead, the salted SHA-256 context can be computed once and then cloned when needed.
The performance improvement is pretty minor, but it's worth doing anyway since it's not any more complex.