Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

In the matrix multiplication example, the measurement is done via a simple

    t = time()
    results = calc(n)
    elapsed = time() - t
So startup time at least isn't included.

One might argue that this is still biased against Julia due to its compilation strategy, but fixing that would mean you'd have to figure out what the appropriate way to get 'equivalent' timings for any of the other languages would be as well - something far more involved than just slapping a timer around a block of code in all cases...

edit: As pointed out below, the Julia code should indeed already have been 'warmed up' due to a preceding sanity check. My apologies for 'lying'...



The problem is a minor placement issue for the `@simd` macro: https://github.com/kostya/benchmarks/pull/317


If u cant even read code dont lie xD

    n = length(ARGS) > 0 ? parse(Int, ARGS[1]) : 100
    left = calc(101)  # <------- THIS IS COLD START JITTING CALL
    right = -18.67
    if abs(left - right) > 0.1
        println(stderr, "$(left) != $(right)")
        exit(1)
    end

    notify("Julia (no BLAS)\t$(getpid())")
    t = time()
    results = calc(n)
    elapsed = time() - t
    notify("stop")


not sure why this was downvoted to oblivion, as it seems to be correct


presumably because of the tone.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: