Skip to content

Conversation

@triceo
Copy link
Collaborator

@triceo triceo commented Dec 17, 2025

These changes focus largely (but not exclusively) on removing indirection.
Gets us a few percent here, few percent there, no regressions.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request implements various performance optimizations across indexing and tuple flattening components, achieving incremental improvements without introducing regressions.

Key changes include:

  • Refactored ComparisonIndexer to use a boolean flag instead of Comparator instances, reducing object allocations
  • Optimized BiCompositeKey with custom equals/hashCode implementations to improve hash-based collection performance
  • Converted FlattenItemBag from a record to a class with primitive int counter, eliminating MutableInt wrapper overhead

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
ComparisonIndexer.java Simplified comparison logic with boolean reverseOrder flag, refactored methods using switch expressions for cleaner code organization, and added specialized single/many indexer paths
BiCompositeKey.java Added custom equals() and hashCode() implementations optimized for hash-based collection usage
AbstractFlattenLastNode.java Eliminated MutableInt wrapper by converting FlattenItemBag to a class with primitive counter, refactored update/retract logic for better readability, and optimized removeExtras() with backward iteration

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
67.3% Coverage on New Code (required ≥ 70%)

See analysis details on SonarQube Cloud

@triceo triceo merged commit f8b9aa8 into TimefoldAI:main Dec 17, 2025
33 of 34 checks passed
@triceo triceo deleted the flattenlast branch December 17, 2025 19:24
@triceo triceo self-assigned this Dec 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants