Skip to content

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Aug 19, 2025

The Config* structs only contain a single field, so mark them #[repr(transparent)].

Has no effect on perf, but it doesn't hurt, so on balance I think best to do it.

@github-actions github-actions bot added the C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior label Aug 19, 2025
Copy link
Member Author


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@overlookmotel overlookmotel marked this pull request as ready for review August 19, 2025 12:21
Copilot AI review requested due to automatic review settings August 19, 2025 12:21
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 PR refactors configuration structs in the estree module by adding #[repr(transparent)] attributes to enable potential performance optimizations. The change leverages Rust's transparent representation for single-field structs, which may improve memory layout and function call efficiency.

  • Adds #[repr(transparent)] attribute to all config structs containing only a single ranges field
  • Targets four configuration structs: ConfigTS, ConfigJS, ConfigFixesTS, and ConfigFixesJS

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@codspeed-hq
Copy link

codspeed-hq bot commented Aug 19, 2025

CodSpeed Instrumentation Performance Report

Merging #13212 will not alter performance

Comparing 08-19-refactor_estree_add_repr_transparent_to_config_structs (3f92fa8) with main (792ae31)

Summary

✅ 34 untouched benchmarks

@overlookmotel
Copy link
Member Author

Minor refactor only, so merging without review.

@overlookmotel overlookmotel added the 0-merge Merge with Graphite Merge Queue label Aug 19, 2025
Copy link
Member Author

overlookmotel commented Aug 19, 2025

Merge activity

The `Config*` structs only contain a single field, so mark them `#[repr(transparent)]`.

Has no effect on perf, but it doesn't hurt, so on balance I think best to do it.
@graphite-app graphite-app bot force-pushed the 08-19-refactor_estree_add_repr_transparent_to_config_structs branch from 1b01fae to 3f92fa8 Compare August 19, 2025 12:30
@graphite-app graphite-app bot merged commit 3f92fa8 into main Aug 19, 2025
25 checks passed
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Aug 19, 2025
@graphite-app graphite-app bot deleted the 08-19-refactor_estree_add_repr_transparent_to_config_structs branch August 19, 2025 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants