>>932434 (OP)
Benchmarks that show a language beating C by large margins are a huge red flag that it's propaganda.
- these benchmarks come from the Julia authors themselves.
- they're testing the most recent version of their shit vs an ancient version of GCC. Julia 0.6.x came out Jun 2017. GCC 4.8.x came out March 2013.
- they're not actually testing performance of optimized hot loops, instead it tests performance of subjective 'pretty' code by the Julia dev's standard:
>It is important to note that the benchmark codes are not written for absolute maximal performance (the fastest code to compute recursion_fibonacci(20) is the constant literal 6765). Instead, the benchmarks are written to test the performance of identical algorithms and code patterns implemented in each language.
- subjective 'pretty' code by the Julia devs' standard isn't like you'd actually write in C. For example, this is part of the "matrix_statistics" test above where they're writing C code like you would if it were garbage collected and allocations were cheap:
struct double_pair randmatstat(int t) {
dsfmt_t dsfmt;
dsfmt_init_gen_rand(&dsfmt, 1234);
int n = 5;
struct double_pair r;
double *v = (double*)calloc(t,sizeof(double));
double *w = (double*)calloc(t,sizeof(double));
double *a = (double*)malloc((n)*(n)*sizeof(double));
double *b = (double*)malloc((n)*(n)*sizeof(double));
double *c = (double*)malloc((n)*(n)*sizeof(double));
double *d = (double*)malloc((n)*(n)*sizeof(double));
double *P = (double*)malloc((n)*(4*n)*sizeof(double));
double *Q = (double*)malloc((2*n)*(2*n)*sizeof(double));
double *PtP1 = (double*)malloc((4*n)*(4*n)*sizeof(double));
double *PtP2 = (double*)malloc((4*n)*(4*n)*sizeof(double));
double *QtQ1 = (double*)malloc((2*n)*(2*n)*sizeof(double));
double *QtQ2 = (double*)malloc((2*n)*(2*n)*sizeof(double));
(cont.)
- the C code benchmarks free() per iteration but the Julia code's benchmarks don't include garbage collection.
As expected, the benchmarks are bullshit. Here's the source if you're curious:
https://github.com/JuliaLang/Microbenchmarks