safe pure nothrow sort and sum