shithub: mc

ref: 5fc8fe7bec594a98c7a2b9fbdfc5f7fb4f11c7c9
dir: /bench/intsort.myr/

View raw version
use std

const main = {
    var a
    var i
    var rng
    var t0, t1

    rng = std.mksrng(123)
    a = std.slalloc(1000000)
    for i = 0; i < a.len; i++
        a[i] = std.rand32(rng)
    ;;
    t0 = std.now()
    std.sort(a, std.numcmp)
    t1 = std.now()
    std.put("time = %l\n", t1 - t0)
}