Proper (un)parse comparable data
Unions and options in comparable types do not guarantee any more that ty_of_comparable_ty
in parse_comparable_data
takes a time in the order of the size of the parsed data. So now parsing a big set of a big option type composed only of None
s can take much longer than needed.
We don't want to carbonate ty_of_comparable_ty
though as it make break existing contracts and would make parsing/unparsing such data very expensive for no reasons. Instead we copy the needed parts of parse_data
.
The same applies for unparse_(comparable_)data
.
Costs are basically unchanged (though they could probably be decreased for comparable data, but there is no need to for the time being).
Edited by Raphaël Cauderlier