public static long encode_slow(int x, int y) {
        long z = 0L;
        long xl = (long)x;
        long yl = (long)y;

        long mask = 1L;
        for (int i=0; i<32; i++) {
            long bit = (xl << i) & mask;
            z |= bit;
            //System.out.println("xs  "+ i + ": " + toFullBinaryString(xl << i));
            //System.out.println("m   "+ i + ": " + toFullBinaryString(mask));
            //System.out.println("bit "+ i + ": " + toFullBinaryString(bit));
            //System.out.println("z   "+ i + ": " + toFullBinaryString(z));
            mask = mask << 2;
        }

        mask = 2L;
        for (int i=1; i<=32; i++) {
            long bit = (yl << i) & mask;
            z |= bit;
            mask = mask << 2;
        }
        return z;
    }
Encode two integers by bit-interleaving them into one Long
value.  The x-direction owns the least significant bit (bit
0). Both x and y can have negative values.
<br>
Efficiency considerations: If Java compiles and runs this code
as efficiently as would be the case with a good c-compiler, it
should require 5 cpu operations per bit with optimal usage of
the CPUs registers on a 64 bit processor(2 bit-shifts, 1 OR, 1
AND, and 1 conditional jump for the for-loop). This would
correspond to 320+ cycles with no parallell execution.
Practical experiments show that one call takes ~75 ns on a
64-bit Intel Xeon processor @2.33GHz, or 175 cycles. This gives
an efficiency gain of ~50% due to the CPUs ability to perform
several instructions in one clock-cycle. Here, it is probably the
bit-shifts that can be done independently of the AND an OR
operations, which must be done in sequence.

@param x  x value
@param y  y value
@return the bit-interleaved long containing x and y
vespajlib/src/main/java/com/yahoo/geo/ZCurve.java