Inline name comparison sort function