JuliaHomotopyContinuation / HomotopyContinuation.jl

A Julia package for solving systems of polynomials via homotopy continuation.
https://www.JuliaHomotopyContinuation.org
MIT License
185 stars 30 forks source link

Replace complete evaluation pipeline in ModelKit to speed-up interpreter #503

Closed saschatimme closed 2 years ago

saschatimme commented 2 years ago

Benchmarks

Interpreted [time ratio PR / master]:
┌────────────────┬──────────┬───────────────────────┬──────────┬──────────┐
│         System │ evaluate │ evaluate_and_jacobian │ taylor_1 │ taylor_2 │
├────────────────┼──────────┼───────────────────────┼──────────┼──────────┤
│       four_bar │ 0.389976 │              0.464116 │ 0.590533 │ 0.589088 │
│       bacillus │ 0.369511 │              0.537396 │ 0.575866 │  0.63338 │
│    Tritangtens │ 0.430578 │              0.421184 │ 0.693109 │ 0.634628 │
│        cyclic5 │ 0.582647 │              0.825529 │ 0.726788 │ 0.603976 │
│         minors │ 0.534298 │              0.497503 │ 0.724982 │ 0.611142 │
│          cyclo │ 0.437291 │              0.132599 │ 0.460937 │ 0.497213 │
│        steiner │ 0.479461 │              0.473988 │ 0.732593 │ 0.735462 │
│   fano_quintic │ 0.413683 │              0.353916 │ 0.611969 │ 0.574885 │
│        cyclic7 │  0.43728 │              0.684441 │ 0.621603 │ 0.483001 │
│       moments3 │ 0.523229 │              0.475247 │ 0.674479 │ 0.551807 │
│ RigidMultiView │  0.39803 │               0.32882 │ 0.650077 │ 0.583271 │
│ small_rational │ 0.477334 │              0.437573 │ 0.729487 │ 0.616431 │
│   six_revolute │ 0.425011 │              0.396252 │ 0.708966 │ 0.722287 │
└────────────────┴──────────┴───────────────────────┴──────────┴──────────┘
Compiled [time ratio  PR / master]:
┌────────────────┬──────────┬───────────────────────┐
│         System │ evaluate │ evaluate_and_jacobian │
├────────────────┼──────────┼───────────────────────┤
│       four_bar │  1.12248 │               1.08623 │
│       bacillus │ 0.882261 │               1.00904 │
│    Tritangtens │  1.11399 │               1.01621 │
│        cyclic5 │  1.19788 │               1.33654 │
│         minors │ 0.978404 │               1.01709 │
│          cyclo │  1.13911 │               1.02449 │
│        steiner │  1.48977 │               1.09084 │
│   fano_quintic │ 0.957786 │              0.900727 │
│        cyclic7 │  1.14087 │               1.33471 │
│       moments3 │  1.03276 │               1.34604 │
│ RigidMultiView │ 0.625884 │              0.685239 │
│ small_rational │ 0.337766 │              0.429174 │
│   six_revolute │  1.13994 │               1.05493 │
└────────────────┴──────────┴───────────────────────┘
Time Ratio Compiled / Interpreted [master]:
┌────────────────┬──────────┬───────────────────────┐
│         System │ evaluate │ evaluate_and_jacobian │
├────────────────┼──────────┼───────────────────────┤
│       four_bar │  7.04125 │               4.85375 │
│       bacillus │  9.57861 │               8.10123 │
│    Tritangtens │  6.40007 │               7.31339 │
│        cyclic5 │  6.13671 │               6.63903 │
│         minors │  6.54549 │               7.25888 │
│          cyclo │  10.2598 │               22.3178 │
│        steiner │  8.31871 │               6.17899 │
│   fano_quintic │  7.53778 │                8.4425 │
│        cyclic7 │  6.80683 │               6.64528 │
│       moments3 │  5.14576 │               9.06545 │
│ RigidMultiView │  4.14203 │               5.59389 │
│ small_rational │  2.22074 │               3.02832 │
│   six_revolute │  7.35642 │               8.80795 │
└────────────────┴──────────┴───────────────────────┘
Time Ratio Compiled / Interpreted [PR]:
┌────────────────┬──────────┬───────────────────────┐
│         System │ evaluate │ evaluate_and_jacobian │
├────────────────┼──────────┼───────────────────────┤
│       four_bar │  2.44629 │               2.07388 │
│       bacillus │  4.01174 │               4.31455 │
│    Tritangtens │  2.47375 │               3.03116 │
│        cyclic5 │   2.9849 │               4.10067 │
│         minors │  3.57444 │               3.55064 │
│          cyclo │  3.93864 │               2.88857 │
│        steiner │  2.67725 │               2.68487 │
│   fano_quintic │  3.25569 │               3.31725 │
│        cyclic7 │  2.60898 │               3.40771 │
│       moments3 │  2.60701 │               3.20073 │
│ RigidMultiView │  2.63412 │               2.68429 │
│ small_rational │  3.13837 │               3.08759 │
│   six_revolute │  2.74275 │               3.30843 │
└────────────────┴──────────┴───────────────────────┘