Skip to content

Don't allocate a buffer on the heap when enumerating type metadata. #918

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 17, 2025

Conversation

grynspan
Copy link
Contributor

@grynspan grynspan commented Jan 17, 2025

This PR eliminates the need for us to allocate a large buffer to contain type metadata pointers we discover in type metadata sections using the legacy test discovery mechanism.

Why do I keep opening these PRs? Because for each line of C++ I remove from the Swift toolchain, I get a cookie! 🍪

Checklist:

  • Code and documentation should follow the style of the Style Guide.
  • If public symbols are renamed or modified, DocC references should be updated.

This PR eliminates the need for us to allocate a large buffer to contain type
metadata pointers we discover in type metadata sections using the legacy test
discovery mechanism.

Why do I keep opening these PRs? Because for each line of C++ I remove from the
Swift toolchain, I get a cookie! 🍪
@grynspan grynspan added enhancement New feature or request performance 🏎️ Performance issues labels Jan 17, 2025
@grynspan grynspan added this to the Swift 6.x milestone Jan 17, 2025
@grynspan grynspan self-assigned this Jan 17, 2025
@grynspan
Copy link
Contributor Author

@swift-ci test

Copy link
Contributor

@stmontgomery stmontgomery left a comment

Choose a reason for hiding this comment

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

Nice!

@grynspan grynspan merged commit a5921e0 into main Jan 17, 2025
3 checks passed
@grynspan grynspan deleted the jgrynspan/no-heap-alloc-enumerating-types branch January 17, 2025 21:22
@grynspan grynspan added the less-c++ 🐀 Work to reduce the size of our C++ codebase and/or dependencies label Jan 19, 2025
@grynspan grynspan added the discovery 🔎 test content discovery label Mar 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discovery 🔎 test content discovery enhancement New feature or request less-c++ 🐀 Work to reduce the size of our C++ codebase and/or dependencies performance 🏎️ Performance issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants