Skip to content

Track sizes of comprehension results#901

Merged
jpbetz merged 1 commit intogoogle:masterfrom
jpbetz:fix-comprehension-chain-cost
Feb 28, 2024
Merged

Track sizes of comprehension results#901
jpbetz merged 1 commit intogoogle:masterfrom
jpbetz:fix-comprehension-chain-cost

Conversation

@jpbetz
Copy link
Copy Markdown
Contributor

@jpbetz jpbetz commented Feb 27, 2024

Setting this as draft because I'm not convinced it's entirely correct. It's assuming that the result size of a comprehension matches the iteration. Does this miscount break .filter(), .exists() ...?

Fixes #900

@jpbetz jpbetz force-pushed the fix-comprehension-chain-cost branch from d422885 to d76e4fb Compare February 27, 2024 21:53
@jpbetz jpbetz force-pushed the fix-comprehension-chain-cost branch from d76e4fb to 030abf1 Compare February 27, 2024 23:14
@jpbetz jpbetz marked this pull request as ready for review February 27, 2024 23:15
@jpbetz
Copy link
Copy Markdown
Contributor Author

jpbetz commented Feb 27, 2024

@TristonianJones would you be willing to review?

Any problem test cases you can think of would be really helpful.
You'd mentioned a few additional places where we might need to track size, I had trouble isolating them but if you see any let me know.

@jpbetz jpbetz force-pushed the fix-comprehension-chain-cost branch from 030abf1 to 4464b6a Compare February 28, 2024 00:40
@jpbetz jpbetz force-pushed the fix-comprehension-chain-cost branch from 4464b6a to 2623387 Compare February 28, 2024 01:26
@jpbetz jpbetz force-pushed the fix-comprehension-chain-cost branch from 2623387 to da2e69e Compare February 28, 2024 01:32
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.

Estimated size information lost when .map() result is chained

3 participants