SymbolicML / DynamicQuantities.jl

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

More units #99

Closed Mo-Gul closed 7 months ago

Mo-Gul commented 7 months ago

I'd argue that mbar is also a quite common unit. At least much more than dL. And because I also think that cL is at least as common as dL that should be added as well. Feel free to cherry-pick.

github-actions[bot] commented 7 months ago

Benchmark Results

main df86e36ac4c17a... t[main]/t[df86e36ac4c17a...]
Quantity/creation/Quantity(x) 3.1 ± 0.01 ns 2.79 ± 0.01 ns 1.11
Quantity/creation/Quantity(x, length=y) 3.11 ± 0.01 ns 3.11 ± 0.01 ns 1
Quantity/with_numbers/*real 3.1 ± 0.01 ns 3.1 ± 0.01 ns 1
Quantity/with_numbers/^int 8.37 ± 2.5 ns 8.05 ± 2.2 ns 1.04
Quantity/with_numbers/^int * real 8.37 ± 2.5 ns 8.05 ± 2.2 ns 1.04
Quantity/with_quantity/+y 5.27 ± 0.01 ns 5.27 ± 0.01 ns 1
Quantity/with_quantity//y 3.11 ± 0.01 ns 3.41 ± 0.01 ns 0.912
Quantity/with_self/dimension 1.56 ± 0.01 ns 1.55 ± 0.01 ns 1.01
Quantity/with_self/inv 3.11 ± 0.001 ns 3.11 ± 0.01 ns 1
Quantity/with_self/ustrip 1.55 ± 0.01 ns 1.55 ± 0.01 ns 1
QuantityArray/broadcasting/multi_array_of_quantities 0.15 ± 0.013 ms 0.147 ± 0.14 ms 1.02
QuantityArray/broadcasting/multi_normal_array 0.0498 ± 0.00031 ms 0.053 ± 0.0092 ms 0.941
QuantityArray/broadcasting/multi_quantity_array 0.158 ± 0.0009 ms 0.158 ± 0.00059 ms 1
QuantityArray/broadcasting/x^2_array_of_quantities 25 ± 1.9 μs 25.1 ± 1.8 μs 0.997
QuantityArray/broadcasting/x^2_normal_array 4.29 ± 0.99 μs 4.31 ± 1 μs 0.995
QuantityArray/broadcasting/x^2_quantity_array 6.92 ± 0.23 μs 6.12 ± 0.46 μs 1.13
QuantityArray/broadcasting/x^4_array_of_quantities 0.0784 ± 0.00046 ms 0.0784 ± 0.00073 ms 1
QuantityArray/broadcasting/x^4_normal_array 0.0497 ± 0.00016 ms 0.0497 ± 0.0002 ms 1
QuantityArray/broadcasting/x^4_quantity_array 0.0592 ± 0.00017 ms 0.0594 ± 0.0061 ms 0.997
time_to_load 0.241 ± 0.0066 s 0.243 ± 0.0056 s 0.989

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).

MilesCranmer commented 7 months ago

Thanks!

Mo-Gul commented 7 months ago

I have to thank (all of) you for your awesome work !!!