in reply to Re^2: Faster creation of Arrays in XS?
in thread Faster creation of Arrays in XS?
The idea was to build the string in XS and give that to the caller; not build a string and then build the AoAs from the string; which of course will be slower as your still building the AoAs, but also building and the breaking down the string.
Ie. Build the string instead of the AoAs in XS; and give the caller the string instead of the AoAs; thus avoiding the building of the AoAs entirely.
Be sure to preallocate the string to (even much) bigger than will be required and then use set CUR to trim to the final size.
|
|---|