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

chore(deps): update bumpalo crate #2417

Merged
merged 1 commit into from
Feb 18, 2024
Merged

Conversation

overlookmotel
Copy link
Collaborator

@overlookmotel overlookmotel commented Feb 15, 2024

Latest version of bumpalo includes a couple of performance fixes for String (e.g. fitzgen/bumpalo#229) which may help the parser a little.

@overlookmotel
Copy link
Collaborator Author

Current dependencies on/for this PR:

This stack of pull requests is managed by Graphite.

@github-actions github-actions bot added the A-parser Area - Parser label Feb 15, 2024
Copy link

codspeed-hq bot commented Feb 15, 2024

CodSpeed Performance Report

Merging #2417 will not alter performance

Comparing 02-15-chore_deps_update_bumpalo_crate (607227a) with main (3ff3495)

Summary

✅ 27 untouched benchmarks

@overlookmotel
Copy link
Collaborator Author

What the hell? It actually hurts the benchmarks (very slightly), rather than improving them. I'll have to look into this.

@overlookmotel overlookmotel marked this pull request as draft February 15, 2024 21:28
@Boshen
Copy link
Member

Boshen commented Feb 16, 2024

Next time you can use bumpalo = { git = "your git fork url" } and push the branch here before submitting PRs upstream.

@overlookmotel
Copy link
Collaborator Author

This is a weird one. It was definitely an improvement for bumpalo. It just replicates what std's String does, and produces an 80x speed-up for long strings. Question is why is it not having that positive effect in OXC? Probably it's that JS string literals are typically quite short, so it's not hitting the "sweet spot", but I'd like to bore into it a bit more and check that assumption.

Thanks for the tip about git forks. Yes, I'll do that next time.

@Boshen
Copy link
Member

Boshen commented Feb 18, 2024

It's probably the benchmark not hitting the sweat spots. Let's merge either way.

@Boshen Boshen marked this pull request as ready for review February 18, 2024 03:49
@Boshen Boshen merged commit 90f9266 into main Feb 18, 2024
22 checks passed
@Boshen Boshen deleted the 02-15-chore_deps_update_bumpalo_crate branch February 18, 2024 03:49
@overlookmotel
Copy link
Collaborator Author

overlookmotel commented Feb 19, 2024

OK, thanks for merging.

We can probably do better in the parser as building strings now happens in blocks of 32 bytes, so can write each block with 2 x xmm fixed-length writes rather than calls to copy_nonoverlapping.

#2295 and #2409 may both require a bit of an overhaul of string handling, so can look at it then.

IWANABETHATGUY pushed a commit to IWANABETHATGUY/oxc that referenced this pull request May 29, 2024
Latest version of `bumpalo` includes a couple of performance fixes for
`String` (e.g. fitzgen/bumpalo#229) which may
help the parser a little.
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