var x = haxe.io.Bytes.alloc(0);
cpp.Pointer.ofArray(x.getData());
var y = haxe.io.Bytes.ofHex("");
trace(x.compare(y));
The output is 1. If the second line is removed, the output is 0 as expected. Although x.length and y.length remain at 0, in the actual Array::Memcmp implementation, length for the first argument is 1.