EDIT: I was looking at graph here thinking Julia might be missing: Measured : Which programming language is fastest? (Benchmarks Game) it’s actually still in other graph, and I still argue the categorization (for “naked ffi” is unfair, seemingly at least vs Rust’s code). Also I just think we can still improve Julia’s numbers, and after realizing my mistake, it seems Julia ranking isn’t changed, though it could be if we improve the numbers… I edited the title.
The cause could be bad, but misleading and unfair, showing of Julia:
It seems like Julia takes “6.1” times longer than fastest (there Rust), not competing with Go and F# with 1.2x or Java 1.6x (to name some GC languages), but that ignores the category:
- possible hand-written vector instructions | “unsafe”
Where * Julia #3 is only “1.3” times slower (still slower than Go…). But C goes down to 0.3 x, so Julia is still 4.36 x slower.
Is it “unsafe”, I mean yes, it sure is, but no more or less than e.g. C/C++/Rust, because of:
Base.@propagate_inbounds @inline
But I see @inline
is considered ok for the former category…, so it seem to be only about the former (is it at all [more] problematic?). Is there a good way to write fast code without either?
But Julia isn’t using “hand-written vector instructions” like C, so can we do two things:
a) Get Julia programs there, like that one hand-optimized with all we got?
b) Also improve the default category. I think, but not sure, that it controls showing in the graph we dropped off.
Here Julia is 1.5 x: but is only listed in the non-default category with “naked ffi”
It’s likely because of:
using Base.GMP.MPZ: add_ui!, mul_ui!, add!, tdiv_q!
I’m pretty sure Julia had program in the default category before (for all the programs), and was just re-categorized, but it seems very unfair with the fastest programs, in C++ and Rust, using the same code:
For the C++ approved one #include <gmpxx.h>
- possible hand-written vector instructions | “unsafe” | naked ffi
If anyone can submit a fully “safe” and without “naked ffi” use just in case it’s stopping listing, that would be great!
I don’t recall the numbers for these or if they regressed in 1.11.1 (I don’t think so, at least much, but can at least be made better, Julia’s error bar was always large/r than wanted, because I think of those outliers):
7.3 x (vs 2.7 x for Java…, 2.2 x for Haskell):
3.5 x:
1.7 x:
1.5 x (why is F# doing better while also rounding to 1.5? Seemingly because of threading that Julia doesn’t use in that category):
fasta - Which programs are fastest? (Benchmarks Game) (note there the “unsafe” Julia version at 2.4 x is worse, despite using threading, just seems to make it worse…for that category)