Skip to content

perf(parser): skip single space between tokens branchlessly#2354

Closed
overlookmotel wants to merge 1 commit into02-08-perf_parser_eat_whitespace_after_line_breakfrom
02-08-perf_parser_skip_single_space_between_tokens_branchlessly
Closed

perf(parser): skip single space between tokens branchlessly#2354
overlookmotel wants to merge 1 commit into02-08-perf_parser_eat_whitespace_after_line_breakfrom
02-08-perf_parser_skip_single_space_between_tokens_branchlessly

Conversation

@overlookmotel
Copy link
Copy Markdown
Member

@overlookmotel overlookmotel commented Feb 8, 2024

A reprise of #2029. It's just easier to do now with the Source API.

I'm not sure how much this will move the needle, just wanted to try it out.

@overlookmotel
Copy link
Copy Markdown
Member Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

Current dependencies on/for this PR:

This stack of pull requests is managed by Graphite.

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Feb 8, 2024

CodSpeed Performance Report

Merging #2354 will degrade performances by 4.81%

Comparing 02-08-perf_parser_skip_single_space_between_tokens_branchlessly (2a906b6) with 02-08-perf_parser_eat_whitespace_after_line_break (a3d4ea3)

Summary

❌ 3 regressions
✅ 24 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark 02-08-perf_parser_eat_whitespace_after_line_break 02-08-perf_parser_skip_single_space_between_tokens_branchlessly Change
lexer[pdf.mjs] 20.1 ms 21.1 ms -4.81%
lexer[antd.js] 145 ms 149.7 ms -3.18%
lexer[cal.com.tsx] 36.6 ms 38.1 ms -3.8%

@overlookmotel
Copy link
Copy Markdown
Member Author

Well that didn't work!

@Boshen
Copy link
Copy Markdown
Member

Boshen commented Feb 9, 2024

Maybe relevant: https://v8.dev/blog/scanner#whitespace

@Boshen Boshen deleted the 02-08-perf_parser_skip_single_space_between_tokens_branchlessly branch March 25, 2024 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-parser Area - Parser

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants