Remove unnecessary test_add_many_linear_to_base benchmark
Keep only the essential benchmarks for Linear addition:
- test_sum_linear_small_many: Sum many small linear functions
- test_sum_linear_large_little: Sum few large linear functions
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
7b43ef9
17 days ago
by termoshtt
+1,176%
Add __iadd__ method to Linear for efficient in-place addition
- Add __iadd__ to _ommx_rust.Linear in Rust PyO3 bindings
- Add __iadd__ to ommx.v1.Linear Python wrapper
- Update benchmarks to use += instead of a = a + b
- Add test to verify in-place modification
- Regenerate stub files
This avoids O(N^2) complexity when summing many Linear functions
by modifying the object in place instead of creating copies.
6683404
17 days ago
by termoshtt
-390%
Remove singledispatchmethod overhead from Linear.from_object
Replace singledispatchmethod with direct isinstance checks to reduce
overhead now that the core addition operations have been optimized.
This consolidates all type conversion logic into a single method
with straightforward conditionals for better performance.
- Combine from_object, from_float, from_integer, from_decision_variable
- Remove singledispatchmethod import
- Maintain same functionality with direct type checking