Skip to content

refactor: fix type instability within get_constants #94

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

Merged
merged 1 commit into from
Jul 4, 2024

Conversation

MilesCranmer
Copy link
Member

Because Ref{T} is not the same as Base.RefValue{T}. 🫠

@MilesCranmer MilesCranmer force-pushed the faster-get-constants branch 2 times, most recently from a37da69 to 7fa16e5 Compare July 4, 2024 09:34
@MilesCranmer MilesCranmer force-pushed the faster-get-constants branch from 7fa16e5 to cdb63b0 Compare July 4, 2024 09:34
Copy link
Contributor

github-actions bot commented Jul 4, 2024

Benchmark Results

master cdb63b0... master/cdb63b0eaf1435...
eval/ComplexF32/evaluation 7.39 ± 0.5 ms 7.38 ± 0.45 ms 1
eval/ComplexF64/evaluation 9.7 ± 0.75 ms 9.67 ± 0.69 ms 1
eval/Float32/derivative 10.7 ± 1.5 ms 10.5 ± 1.4 ms 1.01
eval/Float32/derivative_turbo 10.7 ± 1.5 ms 10.5 ± 1.5 ms 1.01
eval/Float32/evaluation 2.7 ± 0.22 ms 2.7 ± 0.22 ms 1
eval/Float32/evaluation_bumper 0.525 ± 0.013 ms 0.57 ± 0.012 ms 0.923
eval/Float32/evaluation_turbo 0.684 ± 0.025 ms 0.693 ± 0.027 ms 0.986
eval/Float32/evaluation_turbo_bumper 0.524 ± 0.013 ms 0.571 ± 0.013 ms 0.918
eval/Float64/derivative 14.2 ± 0.7 ms 13.4 ± 0.54 ms 1.06
eval/Float64/derivative_turbo 14.5 ± 0.81 ms 13.3 ± 0.52 ms 1.09
eval/Float64/evaluation 2.88 ± 0.25 ms 2.91 ± 0.24 ms 0.99
eval/Float64/evaluation_bumper 1.2 ± 0.042 ms 1.26 ± 0.043 ms 0.952
eval/Float64/evaluation_turbo 1.16 ± 0.058 ms 1.17 ± 0.058 ms 0.997
eval/Float64/evaluation_turbo_bumper 1.19 ± 0.042 ms 1.26 ± 0.043 ms 0.948
utils/combine_operators/break_sharing 0.0407 ± 0.0014 ms 0.041 ± 0.0013 ms 0.992
utils/convert/break_sharing 28.4 ± 1.1 μs 28.6 ± 1 μs 0.992
utils/convert/preserve_sharing 0.13 ± 0.0034 ms 0.129 ± 0.0034 ms 1.01
utils/copy/break_sharing 29 ± 0.83 μs 29.6 ± 0.92 μs 0.979
utils/copy/preserve_sharing 0.127 ± 0.0022 ms 0.128 ± 0.0027 ms 0.989
utils/count_constants/break_sharing 11.3 ± 0.18 μs 10.8 ± 0.16 μs 1.05
utils/count_constants/preserve_sharing 0.111 ± 0.0021 ms 0.112 ± 0.0024 ms 0.996
utils/count_depth/break_sharing 17.6 ± 0.37 μs 17.8 ± 0.38 μs 0.987
utils/count_nodes/break_sharing 10.1 ± 0.16 μs 10.3 ± 0.17 μs 0.98
utils/count_nodes/preserve_sharing 0.114 ± 0.0022 ms 0.114 ± 0.0025 ms 0.996
utils/get_set_constants!/break_sharing 0.122 ± 0.0041 ms 0.0424 ± 0.00086 ms 2.87
utils/get_set_constants!/preserve_sharing 0.314 ± 0.0059 ms 0.231 ± 0.0057 ms 1.36
utils/has_constants/break_sharing 4.3 ± 0.21 μs 4.32 ± 0.21 μs 0.995
utils/has_operators/break_sharing 1.78 ± 0.015 μs 1.79 ± 0.022 μs 0.998
utils/hash/break_sharing 0.0326 ± 0.00045 ms 0.0325 ± 0.00044 ms 1
utils/hash/preserve_sharing 0.134 ± 0.0021 ms 0.135 ± 0.0026 ms 0.995
utils/index_constants/break_sharing 27.3 ± 0.67 μs 27.9 ± 0.77 μs 0.979
utils/index_constants/preserve_sharing 0.127 ± 0.0025 ms 0.127 ± 0.0029 ms 1
utils/is_constant/break_sharing 4.76 ± 0.22 μs 4.79 ± 0.22 μs 0.993
utils/simplify_tree/break_sharing 0.153 ± 0.015 ms 0.153 ± 0.015 ms 0.998
utils/simplify_tree/preserve_sharing 0.27 ± 0.017 ms 0.268 ± 0.017 ms 1.01
utils/string_tree/break_sharing 0.386 ± 0.016 ms 0.384 ± 0.013 ms 1.01
utils/string_tree/preserve_sharing 0.524 ± 0.027 ms 0.532 ± 0.02 ms 0.985
time_to_load 0.228 ± 0.0038 s 0.226 ± 0.0023 s 1.01

@MilesCranmer MilesCranmer merged commit cab1143 into master Jul 4, 2024
18 checks passed
@MilesCranmer MilesCranmer deleted the faster-get-constants branch July 4, 2024 11:54
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