Skip to content

Improve splitPart function #17362

@gortiz

Description

@gortiz

The split part function (link) is allocation-heavy.

It first calculates all splits and then only returns the one indexed as requested by its argument. That is very allocation expensive when the index is very small and the separator is repeated several times.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions