I'm Laarej Mohamed, a student applying for Google Summer of Code with SymPy. I recently submitted a pull request addressing issue
#16249 regarding slow Min/Max construction with many arguments.
PR link:
PR #27758My implementation optimizes the performance of Min/Max construction by:
1. Improving the `_is_connected` method to prioritize faster operations
2. Making `_find_localzeros` conditional on `evaluate=True`
The benchmark results show significant improvements:
- Min with 50 symbols (evaluate=True): 3.24s → 0.99s (3.3x faster)
- Max with 50 symbols (evaluate=True): 3.23s → 0.94s (3.4x faster)
- evaluate=False performance remains fast as expected
There is an unrelated test failure in `test_issue_21890` which was already failing in the main branch (TypeError related to complex number comparison).
I'd appreciate your feedback on whether I should:
1. Proceed with the current PR focused on Min/Max optimization
2. Address the unrelated test failure separately
Thank you for your time and consideration.
Best regards,
Mohamed