Jump to content

Recommended Posts

ooh, lol. Never used the function before. Hehe. Good to know though, thanks!

  • Like 2

Share this post


Link to post
Share on other sites

I realized it was wasteful to add the replacement incrementally and then join by empty string. Instead I just join on the replace-string directly. This also works if replacement happens at the the start and end, since then empty strings are still added to the _parts array. I updated my function, and the benchmarks. It gave a tiny reduction, mostly visible on the 10-times search text, where it gave ~ 0.005 ms.

  • Like 1

Share this post


Link to post
Share on other sites

Anyone else get errors when attempting to load these functions into the game?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×