use std.algorithm: cmp
Merge pull request #4122 from 9il/cmp

use std.algorithm: cmp