import six


def mergeable(*mappings):
    """
    Check if the mappings are mergeable (i.e. have no conflicts).

    Best performance is achieved when the mappings are sorted by size.

    Args:
        mappings (Tuple[Mapping[Any, Any]...])

    Returns:
        Boolean
    """
    merge = {}
    for mapping in mappings:
        for key in six.iterkeys(mapping if len(mapping) < len(merge) else merge):
            if key in merge and key in mapping and merge[key] != mapping[key]:
                return False
        merge.update(mapping)
    return True