Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update benchmark results #633

Closed

Conversation

ferrolho
Copy link
Member

@ferrolho ferrolho commented May 7, 2023

Benchmarks of RBD.jl 2.3.2 (b9ef1d6) using Julia 1.8.5 on an Apple MacBook Air (M1, 2020).

I've removed BLAS.set_num_threads(1) from perf/runbenchmarks.jl as it no longer seems relevant for Julia versions >=1.8. See my comments and plots in #500 for more details.

ferrolho and others added 7 commits October 22, 2024 22:19
This PR is mostly a FYI regarding JuliaArrays/StaticArrays.jl#913
Depending on whether or not that issue is closed, you may want to switch to explicitly calling `generic_norm2` on static vectors to circumvent the accuracy issue. The issue arises when combining static arrays with ForwardDiff, in our case it occured in `exp(::SkewSymmetric)`.

I did some benchmarking, and `generic_norm2` is faster than `norm` for all standard arrays up to at least length 9. For static arrays, it appears to do okay as well, while avoiding the accuracy issue.
```julia
julia> a
3-element SVector{3, Int64} with indices SOneTo(3):
 1
 2
 3

julia> @Btime norm($(Ref(a))[]) # standard norm of static array
  5.135 ns (0 allocations: 0 bytes)
3.74166

julia> @Btime norm($(Ref(Vector(a)))[]) # standard norm of  array
  8.545 ns (0 allocations: 0 bytes)
3.74166

julia> @Btime LinearAlgebra.generic_norm2($(Ref((a)))[]) # generic_norm2 of static array
  4.490 ns (0 allocations: 0 bytes)
3.74166

julia> @Btime LinearAlgebra.generic_norm2($(Ref(Vector(a)))[]) # generic_norm2 of array
  7.671 ns (0 allocations: 0 bytes)
3.74166

```
@ferrolho ferrolho force-pushed the hf/update-benchmark-results branch from 1acdbf7 to e3f412b Compare November 5, 2024 19:28
@ferrolho
Copy link
Member Author

ferrolho commented Nov 8, 2024

Closing in favour of #646.

@ferrolho ferrolho closed this Nov 8, 2024
@ferrolho ferrolho deleted the hf/update-benchmark-results branch November 9, 2024 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants