Benchmarks

a = rand(Vec{3})
A = rand(SecondOrderTensor{3})
S = rand(SymmetricSecondOrderTensor{3})
B = rand(Tensor{Tuple{3,3,3}})
AA = rand(FourthOrderTensor{3})
SS = rand(SymmetricFourthOrderTensor{3})
OperationTensorArrayspeed-up
Single contraction
a ⋅ a2.100 ns12.212 ns×5.8
A ⋅ a3.100 ns77.838 ns×25.1
S ⋅ a3.100 ns77.550 ns×25.0
Double contraction
A ⊡ A5.700 ns16.333 ns×2.9
S ⊡ S3.300 ns15.516 ns×4.7
B ⊡ A8.208 ns235.068 ns×28.6
AA ⊡ A9.209 ns261.733 ns×28.4
SS ⊡ S5.700 ns261.988 ns×46.0
Tensor product
a ⊗ a4.800 ns53.966 ns×11.2
Cross product
a × a4.800 ns53.966 ns×11.2
Determinant
det(A)2.800 ns277.866 ns×99.2
det(S)3.000 ns272.076 ns×90.7
Inverse
inv(A)24.198 ns738.632 ns×30.5
inv(S)14.529 ns664.179 ns×45.7
inv(AA)1.460 μs2.311 μs×1.6
inv(SS)657.525 ns2.311 μs×3.5

The benchmarks are generated by runbenchmarks.jl on the following system:

julia> versioninfo()
Julia Version 1.5.4
Commit 69fcb5745b (2021-03-11 19:13 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Xeon(R) CPU E5-2673 v3 @ 2.40GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-9.0.1 (ORCJIT, haswell)