|
I'm surprised you're able to get Turing to run faster, to be honest. I looked at Turing and was impressed by it, but in general my experience with MCMC libraries in Julia is similar to what the OP posted, being much slower than Stan (MAMBA and Turing being the two Julia libraries I've tried--both have seemed nice but have run significantly slower on the tasks I've used them for). Incidentally, I haven't been able to get Turing to run on Julia 0.6, and am not going to reinstall an earlier version just for Turing. I've been waiting for a little while now. My experience with Turing and MAMBA have kind of diminished my enthusiasm for Julia. Both libraries kind of represent what I was looking for in Julia (similar to what you mention about using your Julia stack), but the speed was a kind of a rude awakening. I'm kind of coming to the opinion that LLVM-based languages need to demonstrate much more consistent performance before they're really ready to replace C (Rust, Nim, and Crystal seem like they might be on their way, though). I recommend someone thinking about Julia pay attention to these benchmarks: https://github.com/kostya/benchmarks Yes, Julia is really fast with some things, but for other things it's much slower, and those slow parts become the lowest common denominator. Hopefully things improve, though, because I do like Turing and MAMBA on paper. |
As for the benchmarks you posted, the worst I see Julia performing in that list is on the JSON benchmark. However, again, that's benchmarking a library. Doing high performance text parsing well is a non-trivial problem and JSON.jl isn't a super high performance library. The fact that nobody has sat down and written one yet is more of a reflection of the user community (since JSON is mostly associated with the web stack, JSON-parsing tends to be more incidental for julia users, than languages/libraries that are more focused in that area) than any performance limitation of the language - in fact I think I recently did see somebody working on a higher-performance version, but I don't have the link handy.
To summarize, it is true that some languages (or rather their implementations) are slow, causing an automatic slowdown to projects written therein, but that is generally not the case for julia (or C or Nim or Rust, etc). Once you get to that point, other things matter more, and it is important to distinguish that. In the case of Turing.jl, the linked wiki mentions that one of the primary factors impacting performance is their use of forward AD, when reverse AD would be algorithmically better. It seems understandable, that a newer project would be algorithmically less sophisticated than a more established one. However, that'll get fixed over time and the other benefits will become more and more prominent as a result.