mtasa-blue
mtasa-blue copied to clipboard
Optimize split: Use string_view, and don't buffer if delimiter is a char
This PR removes the redundant buffer(SString, and then new char[]).
Now it only buffers if delimenter.length() > 1
Now it uses std::make_unique(for char[] buffer)
Unit tests here for the no-buffer case
Commit messages aren't perfect. I'll rebase before merging
Nice! And thank you for including the link to your tests.
Did you measure to see the difference in speed in Lua?
This pull request must be updated to use the new argument parser. Afterwards we can merge it.
This draft pull request is stale because it has been open for at least 90 days with no activity. Please continue on your draft pull request or it will be closed in 30 days automatically.
This draft pull request was closed because it has been marked stale for 30 days with no activity.