public static boolean arrayEquals(Object a, Object b) {
		if (a == b)
			return true;
		int numLongs = Array.getLength(a);
		if (numLongs != Array.getLength(b) || !a.getClass().equals(b.getClass()))
			return false;
		int baseOffset = $.arrayBaseOffset(a.getClass());
		int scaleOffset = $.arrayIndexScale(a.getClass());

		for (long currentOffset = baseOffset, i = 0; i < numLongs; ++i, currentOffset += scaleOffset) {
			long l1 = $.getLong(a, currentOffset);
			long l2 = $.getLong(b, currentOffset);
			if (l1 != l2)
				return false;
		}
		return true;
	}