4 ms·
They are measuring compile time and runtime speed, not just runtime speed like for statically compiled langauges
by stabbles 6y ago
They are measuring compile time and runtime speed, not just runtime speed like for statically compiled langauges
- dunefox 6y agoWhere does it say that?
- ZeroCool2u 6y agoI'm not a huge Julia user, but typically if they don't specifically mention they're segmenting runtime from compilation time with Julia, that's a bit of a red flag, because unlike Rust, Go, or C++ the compilation step isn't separate in Julia. To the user it just looks like it's running, when in reality it's compiling, then running, without really letting you know in between.
- cygx 6y agoIn 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'...
- komuher 6y agoIf 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")
- 3JPLW 6y agoThe problem is a minor placement issue for the `@simd` macro: https://github.com/kostya/benchmarks/pull/317 https://github.com/kostya/benchmarks/pull/317
- stabbles 6y agoAh, I have to take that back, since benchmarks run in the order of seconds and they use sockets to start and stop the timer, which likely means compilation time is not included.
- deleted 6y ago[deleted]
- stjohnswarts 6y agoIs that truly accurate though ? I could see them comparing say load time of data files plus execution time but combining compile times in there doesn't make much sense. You always have to pay for it in julia but not with a statically compiled file.
- dklend122 6y agoYou only pay for it on the first run.