140620 Created span_compare algorithm