Hacker News new | ask | show | jobs
by pmcg 4253 days ago
There can be two allocations when you call String.Split, one at the calling site where you create the array of delimiters to pass in, and one inside that creates the String[] to return.

The parent refers to the first, which you can avoid by creating your char[] of delimiter[s] once and reusing it.