Faster string concatenation: Alternative method

Share your advanced PureBasic knowledge/code with the community.
User avatar
Lunasole
Addict
Addict
Posts: 1091
Joined: Mon Oct 26, 2015 2:55 am
Location: UA
Contact:

Re: Faster string concatenation: Alternative method

Post by Lunasole »

Steving wrote:I can't believe how much faster it is than standard string concatenation. I measured the performance in a loop with 100,000 iterations adding 4 items per iteration, yielding a total string length of 2,188,895 characters with an elapsed milliseconds of 311. Standard "" + "" string concatenation took (yawn!) 555,746 Milliseconds with an elapsed wall time of 17 minutes. Thank you so much for your contribution. I'm going to make multiple copies so that I can use it to work on multiple strings at at time. I'll have a herd of Cat's when I'm done :D :D :D. This is going to save my bacon. Unfortunately with the API that I'm using I need strings... lots of strings...

Thanks again!

Stevinga
Another one. I don't know is it still "fastest here except ASM", or not ^^ lol

viewtopic.php?f=12&t=69079
"W̷i̷s̷h̷i̷n̷g o̷n a s̷t̷a̷r"
Post Reply