Ported union, difference, and intersect to clipper2-ts to improve performance #2997
All Vouch review confidence checks passed
Residual risk 0.25 = Change Risk (0.43) × (1 − Review Confidence (0.41)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.43 · 193 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.315
Real PR Conversation Timeline
1 comments
"Review active on #2997"
general
weight: 0.35
smallsaucepan
Addresses performance issues in these three packages introduced in v7.2.0.
Performance improvement summary:
| function | improvement |
|-|-|
| difference | 20x to 130x |
| intersect | 55x to 60x |
|union | 10x to 120x |
Requires a custom rollup config to support es5 minified output (clipper2-ts requires bigint, which needs to be polyfilled with the JSBI library before bundling). This should only be a temporary measure until we move to a more modern target on a major version release.
Inclusion of JSBI into minified output results in approx 40% bundle size increase. Feel performance is causing more pain than bundle size though, so still consider worth while. And as mentioned above, it won't be forever.
Adds a non-published "internal" module for shared code. Can be used for other packages as a way to avoid copy-pasting code.
Resolves #2851
Resolves #2833
Resolves #2955
Please provide the following when creating a PR:
contributorsfield ofpackage.json- you've earned it! 👏