Check for exact lengths of both strings instead of > 0. We have one additional length check but the string conversions happen only when the string length matches.
This change should be save, anyhow comments are welcome.
And as we know that the length of head will get ~16 bytes one could initialize it with at least 16 bytes to avoid that the JVM extends the buffer during runtime. Currently 5 bytes are used: "protected StringBuilder head = new StringBuilder(5);"