1. A method for comparing a query object and a set of database objects comprising: providing quantized representations of database objects which have each been transformed with a quantized embedding function which is the composition of a real-valued embedding function and a quantization function; transforming the query object to a representation in a real-valued embedding space using the real-valued embedding function; storing a set of computed query-dependent estimated distance values for the query object, based on the transformed query object; and computing a comparison measure between the query object and each of the quantized database object representations based on the stored query-dependent estimated distance values; and outputting data based on the comparison computation.