Quote from: Longfellow on July 15, 2009, 11:21:18 pm
Quote from: Blizzard on July 15, 2009, 04:58:02 am
The only one that wins are the users of RMX-OS because these results show that they definitely have a good and optimized server.
Also, I don't think the architecture (except for the communication protocol) is that relevant. These results don't mean that more complicated regular expressions wouldn't be slower. i.e. It could be that Netplay+ message protocol (in form of "<tag_name>data</tag_name>") wouldn't work so fast with regular expressions.
I meant that a basic C server would most likely just stuff everything into a 3-4 bytes per message (one identifier, 2-3 arguments, each as a char, maybe a short/int) and evaluate it in a simple loop, which definitely has the potential to be much, much faster. Of course, in Ruby stuff like that becomes slightly more complicated and a waste of effort.
What you are talking makes no sense. You are saying that in C you can make a message like "CHTBlizzard: Hello. My name is Blizzard and I am a programmer." be 3-4 bytes long which is complete bullshit.
First thing, the message is far too long to be compressed down to 3 bytes.
Secondly, my message identifiers are 3 characters long which translates into 3 bytes of application data that are sent over the network (sent using Win32API which was written in C/Assembly, helloooooooooo). Altogether it means that whatever I do in Ruby, it will be turned into actual C data before sent over the network. In fact, this will happen in any language because practically all socket controlling programs were written in low level languages because nobody would make one in a high level language. That's like coding an operating system in a high level language: You don't do that.
Thirdly, sending a message over the network using
TCP isn't just sending 3 bytes. It's sending at least 160 + 3 bytes. That results in actually far better communication when you use longer messages or put several messages in one TCP package (but I didn't go that far with RMX-OS because that could create lag significant lag). That also means using a single byte and all of 256 possible states as identifier is just idiotic. Sending 2 additional bytes over the network is much less costly than manipulating raw byte streams so it's just a minimal message. You fail at computer communcation protocols. Horribly.
That's what I hate about C programmers. They are so narrow-sighted that they think C is the best and the fastest language for every single purpose that there is out in the world. They think that they can do just everything with "just a few bytes" while they completely ignore the practical usability. If they did just that, it would be actually ok, but they are much worse. They have no problem wasting irreasonable amount of CPU time just to save 10% of memory. We don't live in a time anymore where we have only 64kB of memory. I'm not saying to waste memory, but I have no problem increasing memory usage by 10% if I can speed up execution time by 400% because the program doesn't recalculate some things over and over again. I guess that is what makes the difference between a "programmer" and a "programm engineer".
Saying stuff like this just to make you look smart is really idiotic. Level down for that degree of arrogance. "just stuff everything into a 3-4 bytes per message" Woah, you should listen to yourself.