julia-numpy-fortran-test
Tullio.jl
julia-numpy-fortran-test | Tullio.jl | |
---|---|---|
2 | 4 | |
7 | 583 | |
- | - | |
0.0 | 5.2 | |
almost 3 years ago | 5 months ago | |
Fortran | Julia | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
julia-numpy-fortran-test
-
Optimized Rust Is Stil Slower Than Python+NumPy
No surprise, because NumPy is implemented with Fortran which is designed to be efficient and fast at mathematical operations. Rust is not. And Python is not either, which is why it uses Fortran under the covers.
I wouldn't be surprised to Rust numerical libraries created similar to NumPy which also use Fortran, for the same reasons.
If you want a real comparison, try NumPy vs Julia:
https://www.matecdev.com/posts/numpy-julia-fortran.html
-
Julia: Faster than Fortran, cleaner than Numpy
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)'))
Tullio.jl
- A basic introduction to NumPy's einsum
- Generic GPU Kernels
-
Julia: Faster than Fortran, cleaner than Numpy
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
What are some alternatives?
Numba - NumPy aware dynamic Python compiler using LLVM
Zygote.jl - 21st century AD
DaemonMode.jl - Client-Daemon workflow to run faster scripts in Julia
CUDA.jl - CUDA programming in Julia.
JuliaInterpreter.jl - Interpreter for Julia code
ForwardDiff.jl - Forward Mode Automatic Differentiation for Julia
TensorOperations.jl - Julia package for tensor contractions and related operations
futhark - :boom::computer::boom: A data-parallel functional programming language
FoldsCUDA.jl - Data-parallelism on CUDA using Transducers.jl and for loops (FLoops.jl)