Performance-nit:  Pull a.content[as] and b.content[bs] into local variables within the body of the while loop so we only evaluate the array index once per position.

Basically, the compiler can't prove that a.content[as] wasn't modified between the two reads of it, so it'll have to read it again.  Since array bounds have to be checked at runtime, we have to recheck as against the array length.  The JIT _might_ be able to avoid the array bound check   Pulling into a local proves to the compiler it can cache the value safely.