6 ms·
If you do concatenation a lot, it's better (for performance, of course) if you make it a template (so Nim will just replace a + b with a & b): template `+`(a
by Tiberium 9y ago
If you do concatenation a lot, it's better (for performance, of course) if you make it a template (so Nim will just replace a + b with a & b):
template `+`(a, b: string): string = a & b
But probably C compiler is smart enough to inline your proc :)
- jamiesonbecker 9y agoAh, brilliant! thanks!!