mtasa-blue icon indicating copy to clipboard operation
mtasa-blue copied to clipboard

Optimize split: Use string_view, and don't buffer if delimiter is a char

Open Pirulax opened this issue 5 years ago • 3 comments

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

Pirulax avatar Jun 27 '20 19:06 Pirulax

Commit messages aren't perfect. I'll rebase before merging

Pirulax avatar Jun 27 '20 19:06 Pirulax

Nice! And thank you for including the link to your tests.

Did you measure to see the difference in speed in Lua?

qaisjp avatar Oct 25 '20 02:10 qaisjp

This pull request must be updated to use the new argument parser. Afterwards we can merge it.

botder avatar Sep 11 '22 15:09 botder

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.

github-actions[bot] avatar Mar 26 '23 01:03 github-actions[bot]

This draft pull request was closed because it has been marked stale for 30 days with no activity.

github-actions[bot] avatar Apr 26 '23 01:04 github-actions[bot]