Skip to content
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

perf(sourcemap): remove unnecessary binary search #2728

Merged

Conversation

underfin
Copy link
Contributor

Becuase position argument is ordering, using binary search is unnecessary.

@github-actions github-actions bot added the A-codegen Area - Code Generation label Mar 15, 2024
Copy link

codspeed-hq bot commented Mar 15, 2024

CodSpeed Performance Report

Merging #2728 will improve performances by 12.09%

Comparing underfin:perf-search_original_line_and_column (62d9390) with main (2be5f9d)

Summary

⚡ 2 improvements
✅ 27 untouched benchmarks

Benchmarks breakdown

Benchmark main underfin:perf-search_original_line_and_column Change
codegen_sourcemap[react.development.js] 16 ms 15.1 ms +5.74%
codegen_sourcemap[typescript.js] 1.6 s 1.5 s +12.09%

@Boshen Boshen merged commit d7004da into oxc-project:main Mar 15, 2024
17 checks passed
@underfin underfin deleted the perf-search_original_line_and_column branch March 15, 2024 12:18
Boshen pushed a commit that referenced this pull request May 20, 2024
…3360)

The ast span is not ordering at rolldown, eg the module original ast is
`a,b,c`, after mutate could be `b,c,a`. So here revert changes from
[here](#2728).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-codegen Area - Code Generation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants