Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Julia ships with OpenBLAS, in some cases there are pure-Julia "blas-like" routine that can be as fast:
https://github.com/mcabbott/Tullio.jl
Proving again in the next upcoming release candidate.
Are you hitting the startup time very often? If so, you might want to try some things to keep one julia session open and sending code to it like a daemon instead of constantly closing and opening sessions.
This package makes that workflow really easy: https://github.com/dmolina/DaemonMode.jl
If you need to run small scripts and can't switch to a persistent-REPL-based workflow, you might consider starting Julia with the `--compile=min` option. You can also reduce startup times dramatically by building a sysimg with PackageCompiler.jl
There is also technically an interpreter if you want to go that way [1], so in principle it might be possible to do the same trick javascript does, but someone would have to implement that.
[1] https://github.com/JuliaDebug/JuliaInterpreter.jl
Numba exists, which is a vectorizing, optimizing JIT compiler for a subset of Python that uses NumPy. You simply install it and add a decorator.
https://numba.pydata.org
Is the python code missing a square root?
https://github.com/mdmaas/julia-numpy-fortran-test/blob/main...
For fun I ran in Matlab with a 2.9 GHz i7-7820HQ and get about 1.83s for N=10,000 single threaded.
A = exp((k*1i)*sqrt(a.^2 + (a.^2)'))