Now of course, if you're doing something like...
%name SPC %lastname
You can't necessarily just throw the space into the string.
Ignoring that though and straight to the tests. 10 million times. 3 tests. Compared using getRealTime.
The code:
%start = getRealTime();
for(%x=0;%x<10000000;%x++)
{
%str = "bob " @ "borker";
}
%end = getRealTime();
commandToClient(%client,'ServerMessage', '', '\c3Space @: %1', %end-%start);
%start = getRealTime();
for(%x=0;%x<10000000;%x++)
{
%str = "bob" @ " " @ "borker";
}
%end = getRealTime();
commandToClient(%client,'ServerMessage', '', '\c3Double @: %1', %end-%start);
%start = getRealTime();
for(%x=0;%x<10000000;%x++)
{
%str = "bob" SPC "borker";
}
%end = getRealTime();
commandToClient(%client,'ServerMessage', '', '\c3SPC: %1', %end-%start);
The results:
Space @ ("string " @ "string"): 2668
Double @ ("string" @ " " @ "string"): 3042
SPC ("string" SPC "string"): 2778
SPC is slower, but of course, if you're joining two vars by a space, it's better than doing @ " " @.