Skip to content

Change String::toLines to use ValueOption instead of Option#852

Open
Numpsy wants to merge 1 commit intofsprojects:masterfrom
Numpsy:valueoption_one
Open

Change String::toLines to use ValueOption instead of Option#852
Numpsy wants to merge 1 commit intofsprojects:masterfrom
Numpsy:valueoption_one

Conversation

@Numpsy
Copy link
Copy Markdown
Contributor

@Numpsy Numpsy commented Apr 26, 2026

If reduces memory allocations slightly

Just a thought.

Current benchmark project allocation results

| Method         | Mean     | Error   | StdDev  | Gen0       | Gen1      | Gen2      | Allocated |
|--------------- |---------:|--------:|--------:|-----------:|----------:|----------:|----------:|
| LintParsedFile | 842.2 ms | 5.43 ms | 4.81 ms | 25000.0000 | 8000.0000 | 1000.0000 | 397.55 MB |

With this change

| Method         | Mean     | Error   | StdDev  | Gen0       | Gen1      | Gen2      | Allocated |
|--------------- |---------:|--------:|--------:|-----------:|----------:|----------:|----------:|
| LintParsedFile | 837.7 ms | 4.83 ms | 4.29 ms | 25000.0000 | 8000.0000 | 1000.0000 | 396.83 MB |

If reduces memory allocations slightly
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.

1 participant