Distributed comparison function implementation
Copyright (C) myl7
SPDX-License-Identifier: Apache-2.0