The efficient packing scheme of computing similarities