SymbolicML / DynamicExpressions.jl

Ridiculously fast symbolic expressions
https://symbolicml.org/DynamicExpressions.jl/dev
Apache License 2.0
90 stars 11 forks source link

Preserve container types #33

Closed MilesCranmer closed 1 year ago

MilesCranmer commented 1 year ago

Right now the evaluation code seems to convert all container types to Vector and Matrix.

This fixes it. Now you can pass in a StaticArrays object, and all calculations will be performed with the same StaticArrays.

github-actions[bot] commented 1 year ago

Pull Request Test Coverage Report for Build 4957885653


Changes Missing Coverage Covered Lines Changed/Added Lines %
src/EvaluateEquationDerivative.jl 10 11 90.91%
<!-- Total: 51 52 98.08% -->
Totals Coverage Status
Change from base Build 4928258683: -0.2%
Covered Lines: 958
Relevant Lines: 1083

💛 - Coveralls
github-actions[bot] commented 1 year ago

Benchmark Results

master 924a831ba46594... t[master]/t[924a831ba46594...]
eval/ComplexF32/evaluation 9.22 ± 0.49 ms 9.29 ± 0.52 ms 0.993
eval/ComplexF64/evaluation 11.8 ± 0.73 ms 11.8 ± 0.7 ms 0.995
eval/Float32/derivative 17.1 ± 0.86 ms 16.4 ± 0.82 ms 1.04
eval/Float32/derivative_turbo 17.1 ± 0.75 ms 16.9 ± 0.7 ms 1.01
eval/Float32/evaluation 3.41 ± 0.26 ms 3.35 ± 0.25 ms 1.02
eval/Float32/evaluation_turbo 0.763 ± 0.034 ms 0.767 ± 0.036 ms 0.995
eval/Float64/derivative 23.5 ± 4.2 ms 23.6 ± 4.6 ms 0.997
eval/Float64/derivative_turbo 24.8 ± 4.2 ms 24.8 ± 4.7 ms 1
eval/Float64/evaluation 4.05 ± 0.3 ms 4.02 ± 0.29 ms 1.01
eval/Float64/evaluation_turbo 1.21 ± 0.055 ms 1.18 ± 0.056 ms 1.03
time_to_load 12.8 ± 0.0042 s 12.9 ± 0.17 s 0.992
utils/combine_operators/break_sharing 0.0608 ± 0.0041 ms 0.0589 ± 0.0037 ms 1.03
utils/convert/break_sharing 0.0489 ± 0.0052 ms 0.0489 ± 0.0042 ms 1
utils/convert/preserve_sharing 0.237 ± 0.008 ms 0.237 ± 0.0076 ms 1
utils/copy/break_sharing 0.0469 ± 0.0035 ms 0.0464 ± 0.0031 ms 1.01
utils/copy/preserve_sharing 0.235 ± 0.0063 ms 0.235 ± 0.0059 ms 0.998
utils/count_constants/break_sharing 27.8 ± 1.1 μs 27 ± 0.9 μs 1.03
utils/count_depth/break_sharing 27.9 ± 1.2 μs 27.8 ± 0.9 μs 1
utils/count_nodes/break_sharing 25.5 ± 0.9 μs 26 ± 0.8 μs 0.981
utils/get_set_constants!/break_sharing 0.106 ± 0.0025 ms 0.105 ± 0.0025 ms 1.01
utils/has_constants/break_sharing 8.24 ± 0.61 μs 7.87 ± 0.59 μs 1.05
utils/has_operators/break_sharing 2.3 ± 0.067 μs 2.68 ± 0.07 μs 0.859
utils/index_constants/break_sharing 0.0818 ± 0.0041 ms 0.0807 ± 0.0036 ms 1.01
utils/is_constant/break_sharing 7.91 ± 0.53 μs 8.26 ± 0.6 μs 0.958
utils/simplify_tree/break_sharing 0.168 ± 0.017 ms 0.17 ± 0.016 ms 0.988

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