[erlang-questions] why my test case of socket are always slower much than c++

Peter syupei@REDACTED
Tue Jun 18 13:45:31 CEST 2013


i test for the socket rec/sed speed,

 i used  c++、Erlang and golang,  and the result like this:




so, i want know,  why always  slow  when erlang as a rec-server.  is use 
wrong?

my source code see attachment,  and my test case like this:

the erlang server:
erl +K true 
server:start(8080, 200)

the erlang client:
erl +K true
client:start(192.168.0.1, 8080, 200, 1000*10000)

the cpp server:
./server 192.168.0.1 8080 200

the cpp client:
./client 192.168.0.1 8080  10000000 200





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130618/ae11c218/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: client.erl
Type: application/octet-stream
Size: 737 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130618/ae11c218/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: server.erl
Type: application/octet-stream
Size: 1232 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130618/ae11c218/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: client.cpp
Type: text/x-c++src
Size: 1728 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130618/ae11c218/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: server.cpp
Type: text/x-c++src
Size: 1818 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130618/ae11c218/attachment-0001.bin>


More information about the erlang-questions mailing list