Skip to content

Update docs and add doctests #175

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

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

Conversation

abhro
Copy link

@abhro abhro commented Apr 21, 2025

Please see the commmit messages for relevant changes

This comment was marked as outdated.

@icweaver icweaver mentioned this pull request May 13, 2025
2 tasks
Copy link
Contributor

github-actions bot commented Jun 6, 2025

Benchmark Results (Julia v1.10)

Time benchmarks
main 9a5c371... main / 9a5c371...
Quantity/creation/Quantity(x) 4.95 ± 0.01 ns 3.11 ± 0.92 ns 1.59 ± 0.47
Quantity/creation/Quantity(x, length=y) 3.11 ± 0.001 ns 3.11 ± 0.01 ns 1 ± 0.0032
Quantity/with_numbers/*real 3.1 ± 0.01 ns 3.1 ± 0.01 ns 1 ± 0.0046
Quantity/with_numbers/^int 8.05 ± 1.6 ns 8.05 ± 1.6 ns 1 ± 0.27
Quantity/with_numbers/^int * real 7.75 ± 1.6 ns 7.75 ± 1.6 ns 1 ± 0.28
Quantity/with_quantity/+y 4.04 ± 0.001 ns 4.04 ± 0.001 ns 1 ± 0.00035
Quantity/with_quantity//y 3.42 ± 0.01 ns 3.42 ± 0.011 ns 1 ± 0.0044
Quantity/with_self/dimension 3.1 ± 0.01 ns 3.11 ± 0.01 ns 0.997 ± 0.0045
Quantity/with_self/inv 3.41 ± 0.01 ns 3.41 ± 0.01 ns 1 ± 0.0042
Quantity/with_self/ustrip 3.1 ± 0.01 ns 3.1 ± 0.01 ns 1 ± 0.0046
QuantityArray/broadcasting/multi_array_of_quantities 0.144 ± 0.0016 ms 0.149 ± 0.0014 ms 0.97 ± 0.014
QuantityArray/broadcasting/multi_normal_array 0.0467 ± 0.00017 ms 0.0467 ± 0.00019 ms 1 ± 0.0055
QuantityArray/broadcasting/multi_quantity_array 0.155 ± 0.00095 ms 0.155 ± 0.0012 ms 1 ± 0.0099
QuantityArray/broadcasting/x^2_array_of_quantities 22.1 ± 1.2 μs 21.7 ± 1.1 μs 1.02 ± 0.075
QuantityArray/broadcasting/x^2_normal_array 3.8 ± 0.71 μs 3.92 ± 0.93 μs 0.969 ± 0.29
QuantityArray/broadcasting/x^2_quantity_array 6.9 ± 0.21 μs 6.9 ± 0.23 μs 1 ± 0.045
QuantityArray/broadcasting/x^4_array_of_quantities 0.0785 ± 0.00062 ms 0.0786 ± 0.00049 ms 0.999 ± 0.01
QuantityArray/broadcasting/x^4_normal_array 0.0436 ± 0.00014 ms 0.0435 ± 0.0034 ms 1 ± 0.079
QuantityArray/broadcasting/x^4_quantity_array 0.0437 ± 0.00015 ms 0.0437 ± 0.00015 ms 1 ± 0.0049
time_to_load 0.186 ± 0.00073 s 0.186 ± 0.00072 s 1 ± 0.0055
Memory benchmarks
main 9a5c371... main / 9a5c371...
Quantity/creation/Quantity(x) 0 allocs: 0 B 0 allocs: 0 B
Quantity/creation/Quantity(x, length=y) 0 allocs: 0 B 0 allocs: 0 B
Quantity/with_numbers/*real 0 allocs: 0 B 0 allocs: 0 B
Quantity/with_numbers/^int 0 allocs: 0 B 0 allocs: 0 B
Quantity/with_numbers/^int * real 0 allocs: 0 B 0 allocs: 0 B
Quantity/with_quantity/+y 0 allocs: 0 B 0 allocs: 0 B
Quantity/with_quantity//y 0 allocs: 0 B 0 allocs: 0 B
Quantity/with_self/dimension 0 allocs: 0 B 0 allocs: 0 B
Quantity/with_self/inv 0 allocs: 0 B 0 allocs: 0 B
Quantity/with_self/ustrip 0 allocs: 0 B 0 allocs: 0 B
QuantityArray/broadcasting/multi_array_of_quantities 2 allocs: 0.382 MB 2 allocs: 0.382 MB 1
QuantityArray/broadcasting/multi_normal_array 2 allocs: 0.0763 MB 2 allocs: 0.0763 MB 1
QuantityArray/broadcasting/multi_quantity_array 2 allocs: 0.0763 MB 2 allocs: 0.0763 MB 1
QuantityArray/broadcasting/x^2_array_of_quantities 2 allocs: 0.382 MB 2 allocs: 0.382 MB 1
QuantityArray/broadcasting/x^2_normal_array 2 allocs: 0.0763 MB 2 allocs: 0.0763 MB 1
QuantityArray/broadcasting/x^2_quantity_array 2 allocs: 0.0763 MB 2 allocs: 0.0763 MB 1
QuantityArray/broadcasting/x^4_array_of_quantities 2 allocs: 0.382 MB 2 allocs: 0.382 MB 1
QuantityArray/broadcasting/x^4_normal_array 2 allocs: 0.0763 MB 2 allocs: 0.0763 MB 1
QuantityArray/broadcasting/x^4_quantity_array 2 allocs: 0.0763 MB 2 allocs: 0.0763 MB 1
time_to_load 0.153 k allocs: 14.5 kB 0.153 k allocs: 14.5 kB 1

Copy link
Contributor

github-actions bot commented Jun 6, 2025

Benchmark Results (Julia v1)

Time benchmarks
main 9a5c371... main / 9a5c371...
Quantity/creation/Quantity(x) 3.1 ± 0.01 ns 3.11 ± 0.01 ns 1 ± 0.0046
Quantity/creation/Quantity(x, length=y) 3.73 ± 0.009 ns 3.74 ± 0.01 ns 0.998 ± 0.0036
Quantity/with_numbers/*real 2.79 ± 0.001 ns 3.11 ± 0.01 ns 0.9 ± 0.0029
Quantity/with_numbers/^int 8.37 ± 1.6 ns 8.68 ± 1.6 ns 0.964 ± 0.25
Quantity/with_numbers/^int * real 8.98 ± 1.6 ns 8.98 ± 1.6 ns 1 ± 0.25
Quantity/with_quantity/+y 4.35 ± 0.01 ns 4.35 ± 0.01 ns 1 ± 0.0033
Quantity/with_quantity//y 3.42 ± 0.011 ns 3.42 ± 0.01 ns 1 ± 0.0044
Quantity/with_self/dimension 3.11 ± 0.01 ns 2.79 ± 0 ns 1.11 ± 0.0036
Quantity/with_self/inv 3.11 ± 0.001 ns 3.11 ± 0.001 ns 1 ± 0.00046
Quantity/with_self/ustrip 3.1 ± 0.01 ns 2.79 ± 0.009 ns 1.11 ± 0.0051
QuantityArray/broadcasting/multi_array_of_quantities 0.0873 ± 0.00078 ms 0.0873 ± 0.00039 ms 1 ± 0.01
QuantityArray/broadcasting/multi_normal_array 0.0497 ± 0.00022 ms 0.0475 ± 0.0022 ms 1.04 ± 0.05
QuantityArray/broadcasting/multi_quantity_array 0.053 ± 0.00022 ms 0.0529 ± 0.0028 ms 1 ± 0.054
QuantityArray/broadcasting/x^2_array_of_quantities 13.1 ± 1.2 μs 13.1 ± 1.3 μs 0.998 ± 0.13
QuantityArray/broadcasting/x^2_normal_array 2.06 ± 0.62 μs 2.07 ± 1.3 μs 0.995 ± 0.67
QuantityArray/broadcasting/x^2_quantity_array 3.46 ± 0.1 μs 3.45 ± 0.13 μs 1 ± 0.047
QuantityArray/broadcasting/x^4_array_of_quantities 0.0812 ± 0.00029 ms 0.0812 ± 0.00029 ms 1 ± 0.0051
QuantityArray/broadcasting/x^4_normal_array 0.0466 ± 0.00016 ms 0.0466 ± 0.00014 ms 1 ± 0.0046
QuantityArray/broadcasting/x^4_quantity_array 0.0467 ± 0.003 ms 0.0467 ± 0.00014 ms 0.998 ± 0.065
time_to_load 0.196 ± 0.00015 s 0.197 ± 0.0023 s 0.996 ± 0.012
Memory benchmarks
main 9a5c371... main / 9a5c371...
Quantity/creation/Quantity(x) 0 allocs: 0 B 0 allocs: 0 B
Quantity/creation/Quantity(x, length=y) 0 allocs: 0 B 0 allocs: 0 B
Quantity/with_numbers/*real 0 allocs: 0 B 0 allocs: 0 B
Quantity/with_numbers/^int 0 allocs: 0 B 0 allocs: 0 B
Quantity/with_numbers/^int * real 0 allocs: 0 B 0 allocs: 0 B
Quantity/with_quantity/+y 0 allocs: 0 B 0 allocs: 0 B
Quantity/with_quantity//y 0 allocs: 0 B 0 allocs: 0 B
Quantity/with_self/dimension 0 allocs: 0 B 0 allocs: 0 B
Quantity/with_self/inv 0 allocs: 0 B 0 allocs: 0 B
Quantity/with_self/ustrip 0 allocs: 0 B 0 allocs: 0 B
QuantityArray/broadcasting/multi_array_of_quantities 3 allocs: 0.382 MB 3 allocs: 0.382 MB 1
QuantityArray/broadcasting/multi_normal_array 3 allocs: 0.0764 MB 3 allocs: 0.0764 MB 1
QuantityArray/broadcasting/multi_quantity_array 3 allocs: 0.0764 MB 3 allocs: 0.0764 MB 1
QuantityArray/broadcasting/x^2_array_of_quantities 3 allocs: 0.382 MB 3 allocs: 0.382 MB 1
QuantityArray/broadcasting/x^2_normal_array 3 allocs: 0.0764 MB 3 allocs: 0.0764 MB 1
QuantityArray/broadcasting/x^2_quantity_array 3 allocs: 0.0764 MB 3 allocs: 0.0764 MB 1
QuantityArray/broadcasting/x^4_array_of_quantities 3 allocs: 0.382 MB 3 allocs: 0.382 MB 1
QuantityArray/broadcasting/x^4_normal_array 3 allocs: 0.0764 MB 3 allocs: 0.0764 MB 1
QuantityArray/broadcasting/x^4_quantity_array 3 allocs: 0.0764 MB 3 allocs: 0.0764 MB 1
time_to_load 0.159 k allocs: 11.2 kB 0.159 k allocs: 11.2 kB 1

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