rsnext/.github
Quentin abe8b1e0a8
Improve performance of String.prototype.split uses (#56746)
This PR adds the optional `limit` parameter on String.prototype.split uses.

> If provided, splits the string at each occurrence of the specified separator, but stops when limit entries have been placed in the array. Any leftover text is not included in the array at all.

[MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split#syntax)

While the performance gain may not be significant for small texts, it can be huge for large ones.

I made a benchmark on the following repository : https://github.com/Yovach/benchmark-nodejs

On my machine, I get the following results:
`node index.js`
> normal 1: 570.092ms
> normal 50: 2.284s
> normal 100: 3.543s

`node index-optimized.js`
> optmized 1: 644.301ms
> optmized 50: 929.39ms
> optmized 100: 1.020s

The "benchmarks" numbers are : 
- "lorem-1" file contains 1 paragraph of "lorem ipsum"
- "lorem-50" file contains 50 paragraphes of "lorem ipsum"
- "lorem-100" file contains 100 paragraphes of "lorem ipsum"
2023-10-19 00:25:15 +00:00
..
actions Improve performance of String.prototype.split uses (#56746) 2023-10-19 00:25:15 +00:00
DISCUSSION_TEMPLATE chore: improve repo templates (#46629) 2023-03-01 09:25:51 -08:00
ISSUE_TEMPLATE chore: remove replay from issue template (#55397) 2023-09-18 17:05:19 +00:00
workflows chore: lower Node.js version requirement (#56943) 2023-10-17 23:15:31 +02:00
.kodiak.toml disable optimistic_updates (#49211) 2023-05-04 15:45:53 +02:00
CODEOWNERS Dev Service (#56442) 2023-10-05 17:45:00 +00:00
invalid-link.md chore: replace issue triaing actions with nissuer (#55525) 2023-09-19 11:11:00 +00:00
invalid-reproduction.md chore: replace issue triaing actions with nissuer (#55525) 2023-09-19 11:11:00 +00:00
labeler.json Update labeler config (#52844) 2023-07-18 18:12:26 +00:00
pnpm-lock.yaml Use node:fs instead of fs-extra in .github/actions (#56536) 2023-10-11 00:52:55 +00:00
pnpm-workspace.yaml chore(ci): add pnpm workspace for github actions (#52976) 2023-07-21 14:29:31 +00:00
pull_request_template.md Update pull_request_template.md (#55098) 2023-09-08 00:19:49 +00:00
simplify-reproduction.md chore: replace issue triaing actions with nissuer (#55525) 2023-09-19 11:11:00 +00:00
verify-canary.md chore: replace issue triaing actions with nissuer (#55525) 2023-09-19 11:11:00 +00:00