Skip to content

Dates.jl + QuantityArray #181

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

Closed
wants to merge 3 commits into from
Closed

Conversation

icweaver
Copy link
Contributor

@icweaver icweaver commented Aug 2, 2025

Dependent PR split out from #178

Covers remaining method ambiguities introduced in that PR

Copy link
Contributor

github-actions bot commented Aug 2, 2025

Benchmark Results (Julia v1.10)

Time benchmarks
main 2d78c42... main / 2d78c42...
Quantity/creation/Quantity(x) 3.1 ± 0.01 ns 2.79 ± 0.01 ns 1.11 ± 0.0053
Quantity/creation/Quantity(x, length=y) 3.11 ± 0.01 ns 3.41 ± 0.01 ns 0.912 ± 0.004
Quantity/with_numbers/*real 3.11 ± 0.01 ns 3.1 ± 0.01 ns 1 ± 0.0046
Quantity/with_numbers/^int 8.67 ± 2.5 ns 8.05 ± 2.2 ns 1.08 ± 0.42
Quantity/with_numbers/^int * real 8.37 ± 2.2 ns 8.37 ± 1.9 ns 1 ± 0.34
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.11 ± 0.001 ns 1.1 ± 0.0032
Quantity/with_self/dimension 3.1 ± 0.01 ns 3.1 ± 0.01 ns 1 ± 0.0046
Quantity/with_self/inv 3.42 ± 0.01 ns 3.11 ± 0.01 ns 1.1 ± 0.0048
Quantity/with_self/ustrip 3.11 ± 0.01 ns 2.79 ± 0.01 ns 1.11 ± 0.0053
QuantityArray/broadcasting/multi_array_of_quantities 0.143 ± 0.0031 ms 0.144 ± 0.0023 ms 0.997 ± 0.027
QuantityArray/broadcasting/multi_normal_array 0.0558 ± 0.003 ms 0.0527 ± 0.003 ms 1.06 ± 0.083
QuantityArray/broadcasting/multi_quantity_array 0.157 ± 0.001 ms 0.157 ± 0.0009 ms 1 ± 0.0088
QuantityArray/broadcasting/x^2_array_of_quantities 24.4 ± 1.9 μs 24.8 ± 2 μs 0.983 ± 0.11
QuantityArray/broadcasting/x^2_normal_array 4.57 ± 0.75 μs 5.05 ± 0.79 μs 0.905 ± 0.21
QuantityArray/broadcasting/x^2_quantity_array 6.91 ± 0.28 μs 6.92 ± 0.35 μs 0.999 ± 0.065
QuantityArray/broadcasting/x^4_array_of_quantities 0.0815 ± 0.0011 ms 0.0817 ± 0.00069 ms 0.997 ± 0.016
QuantityArray/broadcasting/x^4_normal_array 0.0497 ± 0.00014 ms 0.0498 ± 0.00021 ms 0.999 ± 0.0051
QuantityArray/broadcasting/x^4_quantity_array 0.0499 ± 0.00017 ms 0.0529 ± 0.0028 ms 0.942 ± 0.05
time_to_load 0.184 ± 0.002 s 0.187 ± 0.0014 s 0.984 ± 0.013
Memory benchmarks
main 2d78c42... main / 2d78c42...
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 Aug 2, 2025

Benchmark Results (Julia v1)

Time benchmarks
main 2d78c42... main / 2d78c42...
Quantity/creation/Quantity(x) 2.79 ± 0 ns 3.1 ± 0.01 ns 0.903 ± 0.0029
Quantity/creation/Quantity(x, length=y) 3.43 ± 0.011 ns 3.73 ± 0 ns 0.919 ± 0.003
Quantity/with_numbers/*real 3.41 ± 0.01 ns 2.79 ± 0.001 ns 1.22 ± 0.0036
Quantity/with_numbers/^int 8.98 ± 2.2 ns 8.67 ± 2.2 ns 1.04 ± 0.36
Quantity/with_numbers/^int * real 9.29 ± 2.2 ns 9.29 ± 2.2 ns 1 ± 0.33
Quantity/with_quantity/+y 4.04 ± 0.001 ns 4.35 ± 0.01 ns 0.929 ± 0.0021
Quantity/with_quantity//y 3.11 ± 0 ns 3.41 ± 0.01 ns 0.912 ± 0.0027
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.11 ± 0.001 ns 1.1 ± 0.0032
Quantity/with_self/ustrip 2.79 ± 0.01 ns 3.1 ± 0.01 ns 0.903 ± 0.0044
QuantityArray/broadcasting/multi_array_of_quantities 0.0904 ± 0.00076 ms 0.0904 ± 0.00087 ms 1 ± 0.013
QuantityArray/broadcasting/multi_normal_array 0.0498 ± 0.00024 ms 0.0498 ± 0.0002 ms 1 ± 0.0063
QuantityArray/broadcasting/multi_quantity_array 0.0591 ± 0.0061 ms 0.053 ± 0.00021 ms 1.11 ± 0.12
QuantityArray/broadcasting/x^2_array_of_quantities 12.7 ± 1.8 μs 12.7 ± 1.8 μs 1 ± 0.2
QuantityArray/broadcasting/x^2_normal_array 2.01 ± 0.89 μs 2.03 ± 2.1 μs 0.99 ± 1.1
QuantityArray/broadcasting/x^2_quantity_array 3.45 ± 0.11 μs 6.48 ± 0.06 μs 0.532 ± 0.018
QuantityArray/broadcasting/x^4_array_of_quantities 0.0872 ± 0.00072 ms 0.0843 ± 0.0048 ms 1.03 ± 0.06
QuantityArray/broadcasting/x^4_normal_array 0.0497 ± 0.00016 ms 0.0496 ± 0.00014 ms 1 ± 0.0043
QuantityArray/broadcasting/x^4_quantity_array 0.0499 ± 0.00021 ms 0.0468 ± 0.0031 ms 1.06 ± 0.07
time_to_load 0.199 ± 0.0011 s 0.2 ± 0.0011 s 0.996 ± 0.0077
Memory benchmarks
main 2d78c42... main / 2d78c42...
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

Copy link

codecov bot commented Aug 2, 2025

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@b209b7c). Learn more about missing BASE report.

Files with missing lines Patch % Lines
ext/DynamicQuantitiesDatesExt.jl 0.00% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #181   +/-   ##
=======================================
  Coverage        ?   98.98%           
=======================================
  Files           ?       22           
  Lines           ?     1276           
  Branches        ?        0           
=======================================
  Hits            ?     1263           
  Misses          ?       13           
  Partials        ?        0           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@icweaver icweaver changed the title Dates.jl + QuantityArray Dates.jl + QuantityArray Aug 4, 2025
@icweaver
Copy link
Contributor Author

icweaver commented Aug 5, 2025

False alarm, it looks like we can get away with just using tighter typing =] 046b8d4

Will go ahead and close this

@icweaver icweaver closed this Aug 5, 2025
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.

1 participant