The pure Java implementation of mutliplyHigh looks like this:
public static long multiplyHigh(long x, long y) {
if (x < 0 || y < 0) {
// Use technique from section 8-2 of Henry S. Warren, Jr.,
// Hacker's Delight (2nd ed.) (Addison Wesley, 2013), 173-174.
} else {
// Use Karatsuba technique with two base 2^32 digits.
}
This two-way branch gains very little in speed but potentially leaks information to a timing attack. What little the fast path gains from one fewer multiply it loses on the conditional branch: I've not been able to measure any significant difference in speed.