Yes, ocamlc and ocamlopt treat zero-sized heap blocks differently. (Note that the empty list is not a block, hence the different behavior.) As Damien notes, the empty array is actually immutable, so == is not specified in this case.

Unifying the treatment of empty blocks between ocamlc and ocamlopt would be quite a bit of work without any clear benefits, so I'd rather stay with the status quo.