931e1e79

By: ValentinHirschi <valentin.hirschi@gmail.com>

Weighted lowering: grouped together() only for weights with many variables

The grouped conversion pays for the expansion of the weight; Symbolica's own
together() is quadratic in the number of polynomial variables but cheap when
there are few. On a two-loop electroweak boson call (weights of 15 to 23
variables) the grouped path made the scalar lowering about 10 % slower.

Weights below 128 variables now keep together(). Measured per weight:
15-23 variables together 14.0 s vs grouped 19.4 s (1,474 weights);
64-127 variables 0.30 s vs 0.47 s; 256 and more 555 s vs 101 s. Values are
the same Atoms on either path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GitHub
configure