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

Use SVector in all trace methods #207

Merged
merged 9 commits into from
Oct 31, 2024
Merged

Use SVector in all trace methods #207

merged 9 commits into from
Oct 31, 2024

Conversation

henry2004y
Copy link
Owner

Check if the usage of SVector is helpful in all cases.

Copy link

codecov bot commented Oct 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.27%. Comparing base (c8cb82e) to head (1468f6f).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #207      +/-   ##
==========================================
- Coverage   84.46%   84.27%   -0.19%     
==========================================
  Files           9        9              
  Lines         695      687       -8     
==========================================
- Hits          587      579       -8     
  Misses        108      108              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

github-actions bot commented Oct 31, 2024

Benchmark Results

master 1468f6f... master/1468f6feb55575...
trace/GC/in place 0.15 ± 0.045 ms 0.153 ± 0.046 ms 0.98
trace/analytic field/in place 6.71 ± 3.3 μs 8.89 ± 3.4 μs 0.754
trace/analytic field/in place relativistic 9.5 ± 3.3 μs 9.61 ± 3.3 μs 0.989
trace/analytic field/out of place 6.15 ± 2.7 μs 5.98 ± 2.7 μs 1.03
trace/numerical field/Boris 2.24 ± 0.16 μs 2.25 ± 0.15 μs 0.996
trace/numerical field/Boris ensemble 4.29 ± 0.96 μs 4.3 ± 0.92 μs 0.999
trace/numerical field/in place 20.7 ± 3.4 μs 20.8 ± 3.4 μs 0.991
trace/numerical field/out of place 15.7 ± 2.2 μs 15.5 ± 2.6 μs 1.01
trace/time-dependent field/in place 10.2 ± 3.6 μs 8.47 ± 3.5 μs 1.21
trace/time-dependent field/out of place 7.41 ± 2.9 μs 7.3 ± 2.9 μs 1.02
time_to_load 2.12 ± 0.0096 s 2.11 ± 0.039 s 1
master 1468f6f... master/1468f6feb55575...
trace/GC/in place 2.29 k allocs: 0.12 MB 2.29 k allocs: 0.12 MB 1
trace/analytic field/in place 0.199 k allocs: 10.5 kB 0.199 k allocs: 10.5 kB 1
trace/analytic field/in place relativistic 0.199 k allocs: 10.5 kB 0.199 k allocs: 10.5 kB 1
trace/analytic field/out of place 0.159 k allocs: 8.61 kB 0.159 k allocs: 8.61 kB 1
trace/numerical field/Boris 19 allocs: 1.88 kB 19 allocs: 1.88 kB 1
trace/numerical field/Boris ensemble 25 allocs: 3.3 kB 25 allocs: 3.3 kB 1
trace/numerical field/in place 0.2 k allocs: 12.7 kB 0.2 k allocs: 12.7 kB 1
trace/numerical field/out of place 0.159 k allocs: 9.81 kB 0.159 k allocs: 9.81 kB 1
trace/time-dependent field/in place 0.22 k allocs: 11.3 kB 0.22 k allocs: 11.3 kB 1
trace/time-dependent field/out of place 0.177 k allocs: 9.39 kB 0.177 k allocs: 9.39 kB 1
time_to_load 0.157 k allocs: 11.1 kB 0.157 k allocs: 11.1 kB 1

@Beforerr
Copy link
Contributor

BTW vcat(v, dv) is faster than SVector{6}(v..., dv...)

@henry2004y
Copy link
Owner Author

BTW vcat(v, dv) is faster than SVector{6}(v..., dv...)

Based on my test, the time difference is almost negligible.

@henry2004y henry2004y merged commit 75ee267 into master Oct 31, 2024
7 checks passed
@henry2004y henry2004y deleted the svector_optimization branch October 31, 2024 16:49
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