SymbolicML / DynamicExpressions.jl

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

Switch to UInt8/UInt16 for Node fields #50

Closed MilesCranmer closed 10 months ago

MilesCranmer commented 10 months ago

Just to see how much of a performance gain there is.

Note that this is a bit dangerous, as any checks that were using === or !== on fields of the Node will need to adjust their types or use ==/!= respectively.

github-actions[bot] commented 10 months ago

Benchmark Results

master e79953b4e1dd9b... t[master]/t[e79953b4e1dd9b...]
eval/ComplexF32/evaluation 10.7 ± 0.67 ms 10.6 ± 0.67 ms 1.01
eval/ComplexF64/evaluation 12.8 ± 0.79 ms 13 ± 0.93 ms 0.985
eval/Float32/derivative 17.9 ± 3.1 ms 17.7 ± 2.8 ms 1.01
eval/Float32/derivative_turbo 18.5 ± 3.1 ms 19 ± 2.8 ms 0.972
eval/Float32/evaluation 3.59 ± 0.3 ms 3.58 ± 0.3 ms 1
eval/Float32/evaluation_turbo 1.08 ± 0.051 ms 1.11 ± 0.058 ms 0.97
eval/Float64/derivative 24.8 ± 0.72 ms 24.8 ± 0.79 ms 1
eval/Float64/derivative_turbo 26.6 ± 1 ms 26.7 ± 0.83 ms 0.995
eval/Float64/evaluation 3.61 ± 0.28 ms 3.6 ± 0.29 ms 1
eval/Float64/evaluation_turbo 1.5 ± 0.07 ms 1.52 ± 0.092 ms 0.989
time_to_load 0.919 ± 0.0019 s 0.919 ± 0.0055 s 1
utils/combine_operators 0.0622 ± 0.0037 ms 0.0608 ± 0.0038 ms 1.02
utils/convert/break_sharing 0.0482 ± 0.0036 ms 0.044 ± 0.0015 ms 1.1
utils/convert/preserve_sharing 0.234 ± 0.0051 ms 0.234 ± 0.0037 ms 1
utils/copy/break_sharing 0.0474 ± 0.0021 ms 0.0446 ± 0.0016 ms 1.06
utils/copy/preserve_sharing 0.232 ± 0.0043 ms 0.233 ± 0.0035 ms 0.996
utils/count_constants 25.3 ± 0.6 μs 24 ± 0.6 μs 1.05
utils/count_depth 28.6 ± 0.8 μs 27.5 ± 0.7 μs 1.04
utils/count_nodes 26.1 ± 0.6 μs 23.5 ± 0.6 μs 1.11
utils/get_set_constants! 0.101 ± 0.0016 ms 0.0994 ± 0.0018 ms 1.02
utils/has_constants 9.43 ± 0.63 μs 8.87 ± 0.57 μs 1.06
utils/has_operators 2.26 ± 0.044 μs 2.96 ± 0.055 μs 0.763
utils/index_constants 0.0791 ± 0.0037 ms 0.0782 ± 0.0032 ms 1.01
utils/is_constant 9.08 ± 0.62 μs 8.97 ± 0.6 μs 1.01
utils/simplify_tree 0.172 ± 0.016 ms 0.181 ± 0.017 ms 0.951
utils/string_tree 0.347 ± 0.0067 ms 0.343 ± 0.007 ms 1.01

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

coveralls commented 10 months ago

Pull Request Test Coverage Report for Build 5843973251


Totals Coverage Status
Change from base Build 5799365650: -0.02%
Covered Lines: 1078
Relevant Lines: 1184

💛 - Coveralls