SymbolicML / DynamicQuantities.jl

Efficient and type-stable physical quantities in Julia
https://symbolicml.org/DynamicQuantities.jl/dev/
Apache License 2.0
132 stars 17 forks source link

adds Gauss as unit for magnetic flux densities #152

Closed bodokaiser closed 1 week ago

bodokaiser commented 4 weeks ago

Related #151

github-actions[bot] commented 4 weeks ago

Benchmark Results

main b56194e251157a... main/b56194e251157a...
Quantity/creation/Quantity(x) 3.41 ± 0.01 ns 3.41 ± 0.01 ns 1
Quantity/creation/Quantity(x, length=y) 3.11 ± 0.001 ns 3.11 ± 0.01 ns 1
Quantity/with_numbers/*real 4.02 ± 0.01 ns 3.1 ± 0.01 ns 1.29
Quantity/with_numbers/^int 8.05 ± 2.2 ns 8.05 ± 2.2 ns 1
Quantity/with_numbers/^int * real 8.67 ± 2.2 ns 8.67 ± 2.2 ns 1
Quantity/with_quantity/+y 4.04 ± 0.001 ns 4.04 ± 0.001 ns 1
Quantity/with_quantity//y 3.41 ± 0.01 ns 3.42 ± 0.011 ns 0.997
Quantity/with_self/dimension 3.1 ± 0.01 ns 3.1 ± 0.01 ns 1
Quantity/with_self/inv 3.11 ± 0.01 ns 3.11 ± 0.01 ns 1
Quantity/with_self/ustrip 2.79 ± 0.01 ns 2.79 ± 0.01 ns 1
QuantityArray/broadcasting/multi_array_of_quantities 0.145 ± 0.0019 ms 0.148 ± 0.0028 ms 0.979
QuantityArray/broadcasting/multi_normal_array 0.0529 ± 0.00023 ms 0.0528 ± 0.00017 ms 1
QuantityArray/broadcasting/multi_quantity_array 0.155 ± 0.0016 ms 0.155 ± 0.0012 ms 1
QuantityArray/broadcasting/x^2_array_of_quantities 23 ± 1.5 μs 22.9 ± 1.4 μs 1.01
QuantityArray/broadcasting/x^2_normal_array 4.22 ± 0.95 μs 4.18 ± 1.1 μs 1.01
QuantityArray/broadcasting/x^2_quantity_array 7.04 ± 28 μs 7.03 ± 28 μs 1
QuantityArray/broadcasting/x^4_array_of_quantities 0.0787 ± 0.0005 ms 0.0787 ± 0.00046 ms 1
QuantityArray/broadcasting/x^4_normal_array 0.0467 ± 0.0002 ms 0.0467 ± 0.00018 ms 1
QuantityArray/broadcasting/x^4_quantity_array 0.053 ± 0.00018 ms 0.053 ± 0.00016 ms 1
time_to_load 0.166 ± 0.0017 s 0.164 ± 0.00066 s 1.01

Benchmark Plots

A plot of the benchmark results have been uploaded as an artifact to the workflow run for this PR. Go to "Actions"->"Benchmark a pull request"->[the most recent run]->"Artifacts" (at the bottom).

bodokaiser commented 1 week ago

@MilesCranmer Hi Miles, can you check the PR?

MilesCranmer commented 1 week ago

Hey, sorry for completely missing this.

Can you document it within the docs for Tesla? See the other doc strings for examples of the format used. e.g., hours is documented within the docstring for seconds.

bodokaiser commented 1 week ago

@MilesCranmer I updated the PR accordingly