Skip to content

Conversation

SyMind
Copy link
Member

@SyMind SyMind commented Aug 21, 2024

Mark the lifetimes of OnSource, OnChunk, and OnName, indicating that the lifetime of the &str type parameters in their methods is consistent with StreamSource. This ensures that all intermediate steps for computing the source map can directly hold &str without worrying about it being dropped, thereby reducing memory overhead.

Copy link

codspeed-hq bot commented Aug 21, 2024

CodSpeed Performance Report

Merging #106 will improve performances by 24.08%

Comparing SyMind:perf-by-on-index (6d7bb00) with main (5f8b4a0)

Summary

⚡ 3 improvements
✅ 2 untouched benchmarks

Benchmarks breakdown

Benchmark main SyMind:perf-by-on-index Change
concat_generate_base64 61.4 µs 56.6 µs +8.39%
concat_generate_string 59 µs 54.4 µs +8.43%
replace_large_minified_source 126.5 ms 101.9 ms +24.08%

@SyMind SyMind changed the title perf: strict lifecycle perf: strict lifecycle and reduce allocation Aug 22, 2024
@SyMind SyMind marked this pull request as ready for review August 22, 2024 06:46
@SyMind SyMind mentioned this pull request Aug 22, 2024
2 tasks
@SyMind SyMind merged commit 9cca1a9 into web-infra-dev:main Aug 22, 2024
7 checks passed
@SyMind SyMind deleted the perf-by-on-index branch August 22, 2024 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants