Skip to content

perf(linter): use binary_search for arrays with more than 7 elements#10357

Merged
graphite-app[bot] merged 1 commit intomainfrom
04-11-perf/use-binary_search-for-arrays-with-more-than-7-elements
Apr 11, 2025
Merged

perf(linter): use binary_search for arrays with more than 7 elements#10357
graphite-app[bot] merged 1 commit intomainfrom
04-11-perf/use-binary_search-for-arrays-with-more-than-7-elements

Conversation

@shulaoda
Copy link
Contributor

@shulaoda shulaoda commented Apr 11, 2025

Related to #10076

Based on recent conclusions, replace the use of contains with binary_search to improve lookup performance for collections where phf_set was replaced with array before.

@graphite-app
Copy link
Contributor

graphite-app bot commented Apr 11, 2025

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.

@github-actions github-actions bot added A-linter Area - Linter C-performance Category - Solution not expected to change functional behavior, only performance labels Apr 11, 2025
@Boshen Boshen added the 0-merge Merge with Graphite Merge Queue label Apr 11, 2025
Copy link
Member

Boshen commented Apr 11, 2025

Merge activity

…nts (#10357)

Related to #10076

Based on recent findings, improve the lookup efficiency by replacing the `array` with a `phf_set`.
@graphite-app graphite-app bot force-pushed the 04-11-perf/use-binary_search-for-arrays-with-more-than-7-elements branch from 5165d76 to ba538ff Compare April 11, 2025 05:39
@codspeed-hq
Copy link

codspeed-hq bot commented Apr 11, 2025

CodSpeed Instrumentation Performance Report

Merging #10357 will not alter performance

Comparing 04-11-perf/use-binary_search-for-arrays-with-more-than-7-elements (ba538ff) with main (d48e886)

Summary

✅ 36 untouched benchmarks

@graphite-app graphite-app bot merged commit ba538ff into main Apr 11, 2025
29 checks passed
@graphite-app graphite-app bot deleted the 04-11-perf/use-binary_search-for-arrays-with-more-than-7-elements branch April 11, 2025 05:42
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Apr 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-linter Area - Linter C-performance Category - Solution not expected to change functional behavior, only performance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants