Hacker News new | ask | show | jobs
by enriquto 1192 days ago
Will try! The image warping was done by an external program. Julia was used just to multiply two matrices of size 3x3 for each image in the collection. Launching the interpreter took almost a whole second, the rest of the computation was instantaneous.
1 comments

Did you launch Julia for each image separately?
Yes. I was using julia as a shell calculator to multiply small matrices. Octave happens to be much faster for this (admittedly niche) use case.
Working this way is pretty common for small tasks. As has been suggested, Julia 1.9 is a lot faster than it was before. I find it's more like 4 seconds than 0.5 seconds, though.

With plot.jl as

    $ cat plot.jl
    using Plots
    x = range(0, 10, length=100)
    y = sin.(x)
    plot(x, y)
I find that

    $ time julia plot.jl
yields

    4.19s user 0.50s system 106% cpu 4.409 total
Plotting is a complicated beast. If you just want to multiply matrices, there's no "using" statement and you get sub-second running times. Still geologically slow, but at least somewhat manageable.