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

Add informative error when converting symbolic dimensions to Unitful #80

Closed jkrumbiegel closed 11 months ago

jkrumbiegel commented 11 months ago

Fixes #79

github-actions[bot] commented 11 months ago

Benchmark Results

main bfd9d0ee5eb6ba... t[main]/t[bfd9d0ee5eb6ba...]
Quantity/creation/Quantity(x) 3.4 ± 0 ns 3.1 ± 0.1 ns 1.1
Quantity/creation/Quantity(x, length=y) 3.4 ± 0 ns 3.4 ± 0 ns 1
Quantity/with_numbers/*real 3 ± 0.1 ns 3.4 ± 0 ns 0.882
Quantity/with_numbers/^int 11.9 ± 4.1 ns 11.9 ± 3.9 ns 1
Quantity/with_numbers/^int * real 12.2 ± 4.7 ns 12.7 ± 4.4 ns 0.961
Quantity/with_quantity/+y 7.1 ± 0 ns 7.7 ± 0.1 ns 0.922
Quantity/with_quantity//y 3.7 ± 0 ns 3.4 ± 0 ns 1.09
Quantity/with_self/dimension 1.7 ± 0 ns 1.7 ± 0 ns 1
Quantity/with_self/inv 3.4 ± 0 ns 3.4 ± 0 ns 1
Quantity/with_self/ustrip 1.7 ± 0 ns 1.7 ± 0 ns 1
QuantityArray/broadcasting/multi_array_of_quantities 0.224 ± 0.17 ms 0.224 ± 0.17 ms 1
QuantityArray/broadcasting/multi_normal_array 0.076 ± 0.0023 ms 0.0788 ± 0.005 ms 0.964
QuantityArray/broadcasting/multi_quantity_array 0.254 ± 0.0012 ms 0.254 ± 0.0013 ms 1
QuantityArray/broadcasting/x^2_array_of_quantities 0.0432 ± 0.0054 ms 0.0436 ± 0.0054 ms 0.991
QuantityArray/broadcasting/x^2_normal_array 9 ± 1.7 μs 9 ± 1.6 μs 1
QuantityArray/broadcasting/x^2_quantity_array 10 ± 1.8 μs 9.6 ± 1.5 μs 1.04
QuantityArray/broadcasting/x^4_array_of_quantities 0.134 ± 0.0039 ms 0.137 ± 0.0063 ms 0.978
QuantityArray/broadcasting/x^4_normal_array 0.071 ± 0.003 ms 0.0687 ± 0.0007 ms 1.03
QuantityArray/broadcasting/x^4_quantity_array 0.107 ± 0.0015 ms 0.0916 ± 0.011 ms 1.16
time_to_load 0.206 ± 0.00076 s 0.206 ± 0.016 s 0.999

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 11 months ago

Awesome. Thanks!

MilesCranmer commented 11 months ago

Do you need a release or on main for now until the next release is okay?

jkrumbiegel commented 11 months ago

I don't need it, just thought it'd be nice to have for others

MilesCranmer commented 11 months ago

Sounds good, ill do a release