1
Network / sfml tcp socket performance
« on: December 15, 2014, 11:52:56 pm »
Hello
I was wondering what will be faster:
VS
I was wondering what will be faster:
int length = 200;
char* data = new char[length];
... filling ...
socket->send(data, length);
delete[] data;
char* data = new char[length];
... filling ...
socket->send(data, length);
delete[] data;
VS
int length = 10;
char* data = new char[length];
for(int i = 0; i < 20; i++)
{
... filling ...
socket->send(data, length);
}
delete[] data;
char* data = new char[length];
for(int i = 0; i < 20; i++)
{
... filling ...
socket->send(data, length);
}
delete[] data;