How much faster is DCMD than STRCMP?
#3

Quote:
Originally Posted by DracoBlue
I tested (calling 1000000 times) the implementations above, without print-stuff (this would make lag, which isn't called by the function itself!) and had this results:
63 Seconds for first implementation.
18 Seconds for my implementation.
It's all in the topic . Btw. 1 second is 1000 miliseconds, just for the record.

The(other) distadvantage of putting all command logic into _one_ big function (the OnPlayerCommandText-callback) is the (always!) limited size of heap (used when you define new variables). If you don't put the command logic right into that function, but create a function for each command, it is just an extra function call, and you can put as many commands into OnPlayerCommandText without having this problem. The reason why dcmd works that way.

- Draco
Reply


Messages In This Thread
How much faster is DCMD than STRCMP? - by Remi-X - 30.07.2009, 19:46
Re: How much faster is DCMD than STRCMP? - by kaisersouse - 30.07.2009, 20:03
Re: How much faster is DCMD than STRCMP? - by DracoBlue - 30.07.2009, 20:25

Forum Jump:


Users browsing this thread: 1 Guest(s)