Skip to content

NLEIGS MATLAB vs Julia

maxbennedich edited this page Nov 17, 2018 · 7 revisions

System

MacBook Pro, Intel i7-6920HQ, 2.90GHz, 2x4 cores, 16 GB memory

MATLAB / Julia versions

MATLAB: v8.4.0 (R2014b)
Julia: v1.0.2

NLEIGS versions

MATLAB: v0.5 from this page
Julia: master branch as of 2018-11-15 (commit 44a2fc6)

Time measurements

Each experiment was run 10 times, with minimum display level, and the fastest run is reported. Only the solver is timed, not creating the input data.

Memory measurements

In MATLAB, memory usage was measured by summing up all the variables at the end of solver (mem = 0; for w = whos'; mem = mem + w.bytes; end), including the cached LU factors (in Alu).

In Julia,

Results

Number of iterations required for convergence may vary a bit due to different start vectors and tiny rounding errors that build up over time.

Version Experiment # Iter # Conv. λ CPU time Memory usage
MATLAB gun_variantP 100 17 7.14 s 420 MB
Julia gun_variantP 100 17 4.33 s 58.9 MB
MATLAB gun_variantR1 100 21 7.73 s 421 MB
Julia gun_variantR1 100 21 4.26 s 58.9 MB
MATLAB gun_variantR2 95 21 22.69 s 413 MB
Julia gun_variantR2 95 21 14.10 s 51.1 MB
MATLAB gun_variantS 70 21 5.95 s 408 MB
Julia gun_variantS 71 21 3.92 s 46.4 MB
MATLAB particle_variantR2 78 2 19.67 s 213 MB
Julia particle_variantR2 74 2 8.71 s 73.3 MB
MATLAB particle_variantS 141 2 15.05 s 239 MB
Julia particle_variantS 134 2 6.51 s 91.9 MB
Clone this wiki locally