manually inline _logsum method which seems to boost performance on some systems