[Plugin] Pawn.CMD

I believe you meant millisecond(1/1000), not microsecond (1/1000000).
Reply

Quote:
Originally Posted by cdoubleoper
Посмотреть сообщение
I believe you meant millisecond(1/1000), not microsecond (1/1000000).
See the benchmark's source code.
Reply

I don't understand why You did benchmark in C++. Can You do benchmark in PAWN?
Reply

I don't see why everyone's arguing about the speedtest, we all know plugins all alot faster than pawn.
Reply

Quote:
Originally Posted by vannesenn
Посмотреть сообщение
I don't understand why You did benchmark in C++.
Because it is the only right way.
Reply

Quote:
Originally Posted by YourShadow
Посмотреть сообщение
Because it is the only right way.
And ZCMD banchmark?
Reply

Quote:
Originally Posted by vannesenn
Посмотреть сообщение
And ZCMD banchmark?
It only for processors that work through "OnPlayerCommandText".
Reply

I don't understand how you can compare benchmark from C++ and benchmark from PAWN. Lol...
Reply

Quote:
Originally Posted by vannesenn
Посмотреть сообщение
I don't understand how you can compare benchmark from C++ and benchmark from PAWN. Lol...
Reply

Quote:
Originally Posted by cdoubleoper
Посмотреть сообщение
I believe you meant millisecond(1/1000), not microsecond (1/1000000).
Lol... It's obviously microseconds, not milliseconds. If commands took milliseconds to execute in any processor there would be hell! Ditch any processor that is that slow...
Reply

Quote:
Originally Posted by Yashas
Посмотреть сообщение
Go through the reply again if you did not understand. I have told this 100 times to many people already. I can prove that DCMD is as fast as ZCMD if you allow me to add 100 SendClientMessage calls inside the command.
And still you are wrong on this point of argument. If you see all the tests have similar code, and it has never been said that SendClientMessage/print will have greater delay in case of iZCMD and less in Pawn.CMD. For satisfaction, you can take average of the tests and compare.

And moreover in the end, you just don't use commands empty, so why not test it in a better way.
Reply

Quote:
Originally Posted by Gammix
Посмотреть сообщение
And still you are wrong on this point of argument. If you see all the tests have similar code, and it has never been said that SendClientMessage/print will have greater delay in case of iZCMD and less in Pawn.CMD. For satisfaction, you can take average of the tests and compare.

And moreover in the end, you just don't use commands empty, so why not test it in a better way.
Awwww, If I remember correctly, I shouted at you once in your foreach include (where you showed that your foreach is as fast as y_iterate) for having prints inside the foreach when you were comparing the speeds.

Yes, the dealy is equal for all but here is the point...

ZCMD takes "10ms" to process a command (only the processing, i.e: find the function and calling it; this time taken by the command is not counted). iZCMD takes "5ms" to process a commad (only the processing, i.e: find the function and calling it; this time taken by the command is not counted) . strcmp method takes "50ms to process the command" (only the processing, i.e: find the function and calling it; this time taken by the command is not counted).

iZCMD is 2x faster than ZCMD and 10x faster than strcmp method.

Now I will make the test command with 1000 formats. Measured separately these 1000 formats take 1000ms.

Now I conduct the speed test by calling the test command using OnPlayerCommandText(0, "testcmd") and measure the time.
Here are the results,

ZCMD: 1010ms
iZCMD: 1005ms
strcmp method: 1050ms

I hereby conclude that all these command processors at the same speed. Gammix, will you use strcmp in your gamemode now since I have proven that they are almost the same.

Please don't tell why would someone put 1000 formats in one command, understand that I exaggerated purposely so that you could understand what I am trying to say.

About the "you dont use commands comment", you need to understand that WE ARE TIMING HOW FAST THE COMMAND PROCESSOR CAN PROCESS commands not how fast your command processes which is why you should use empty command.

YourShadow was right when he said what I said is wrong because "HIS SPEED TEST ENDS WHEN HE CALLS CheckTime". The SendClientMessage comes after that hence no problem. Hence, in his method, you can add 100000000000 formats and it still won't affect the test because the CheckTime is executed before the junk code.

However, I forgot to mention that ZCMD/iZCMD has processing code even after the command finishes executing. OnPlayerCommandPerformed is called after the command finishes hence ZCMD variants will take some more processing time. Anyway the speed test did not use the callbacks so it shouldn't matter.

@Gammix What are you studying now? High-School? Engineering?

Quote:
Originally Posted by Meller
Посмотреть сообщение
I don't see why everyone's arguing about the speedtest, we all know plugins all alot faster than pawn.
Quote:
Originally Posted by Yashas
Of course, it is impossible for ZCMD/iZCMD to beat PAWN.Cmd for obvious reasons. PAWN.Cmd is a plugin whereas the rest are PAWN based processors.

That wasn't the point of the discussion. I was aware of that fact all the time. When I saw the disparity in the speed measured by your test in the front page, I suspected a flaw to be present in the speed test which is why I asked if I could have a look at it.
Reply

Quote:
Originally Posted by Yashas
Посмотреть сообщение
Awwww, If I remember correctly, I shouted at you once in your foreach include (where you showed that your foreach is as fast as y_iterate) for having prints inside the foreach when you were comparing the speeds.
Should have quoted that in case when i am pretty sure i made that piece of code just casually, without any speed tests mentioned in it. I wonder where i said it was fastest

Speed on this forums is an overkill. And i won't argue with you again. I am pretty happy with my explanations, you enjoy yours.

Quote:
Originally Posted by Yashas
Посмотреть сообщение
@Gammix What are you studying now? High-School? Engineering?
Is that really bothering you ?
Reply

Quote:
Originally Posted by Gammix
Посмотреть сообщение
Should have quoted that in case when i am pretty sure i made that piece of code just casually, without any speed tests mentioned in it. I wonder where i said it was fastest

Speed on this forums is an overkill. And i won't argue with you again. I am pretty happy with my explanations, you enjoy yours.


Is that really bothering you ?
I said you claimed it to be as fast as y_iterate with the flawed speed test (you had printfs inside). When I did the tests the correct way, your foreach was much slower than y_iterate. I never said you said yours was the fastest, you said yours was as fast as y_iterate if I remember correctly.

For some reason I am not able to find your SAMP topic which has all my replies in it where I made multiple attempts to convince you that you were doing the speed tests wrong.

You keep doing the same mistake again and again and you won't bother correcting it. I am not the only one with this opinion (I wont mention their names).

You go your way and I will go my way. I wont reply again because you did not bother to read what I wrote (if you had read, you'd have understood).

I asked for your degree because you seem to be unaware of the profiling/testing procedure.
Reply

How about we just request this useless argument to be deleted...

I don't exactly have time to contact dugi, and it's not exactly my argument.

The forum has a PM system and you both have Skype... don't flood YourShadow's first great, positive release thread... xD
Reply

v3.0 is even better than I expected. Awesome release ! Looking forward to even more new things in future versions (mainly what Crayder suggested, but I don't get why PC_HasFlag is required, if we have PC_GetFlags). I'm converting right now.

By the way, I think that PC_GetFlags should return the flags value instead of having a parameter passed by reference.

EDIT:

Suggestion 1:
pawn Код:
native PC_IsCommand( source[ ], command[ ], bool:alias );
Example:
pawn Код:
public OnPlayerCommandReceived( ... )
{
    if( PC_IsCommand( cmd, "test", false ) ) return 0;
    return 1;
}
Returns:

true:
- if the source is that command
- if the source is an alias of that command and alias is set to true

false:
- if it is not that command and alias is set to false
- if it is an alias but alias is set to false.
- if it is not that command and not an alias

Suggestion 2:
pawn Код:
native PC_SpeltCommand( playerid, destination[ ], maxlength = sizeof destination );
Example:
pawn Код:
alias:test( "hello", "there" );
CMD:test( playerid, params[ ] )
{
    new string[ 6 ];
    PC_SpeltCommand( playerid, string );
    printf( "%d wrote '%s' to call the /test command !", playerid, string );
    // Possible values: hello, there, test.
    return 1;
}
Returns:

true:
- if it passes the spelt command succesfully to destination

false:
- if it failed somehow

Suggestion 3:
pawn Код:
native PC_CommandsCount( );
native PC_AliasesCount( );
native PC_CommandAliasesCount( cmd[ ] );
Reply

@IstuntmanI: PC_HasFlag could be a simple macro for all I care, I was just suggesting it be there on his side. It's looks much more practical than binary code everywhere you need to test a flag.

#define PC_HasFlag(%0,%1) (PC_GetFlags(%0) & %1)

Which poses a new suggestion... Remove the '&flags' parameter from GetFlags and just return the flags.
Reply

This week Pawn.CMD will be updated to version 3.1.
Reply

I had problem with these lines:
PHP код:

    
#if defined OnPlayerCommandReceived
        
forward OnPlayerCommandReceived(playeridcmd[], params[], flags);
    
#endif 
I had to remove them in order to use Pawn.CMD.
Pawn.CMD.inc(29) : error 025: function heading differs from prototype

Edit: Pawn CMD seems to not work at all for me.
Tried 1 filterscript, 2 gamemodes.
The current includes:
PHP код:
#include <a_samp>
//Include
#include <Pawn.CMD>
#include <streamer>
#include <sscanf2>
#include <YSI\y_ini> 
Last time, you said ysi, I'll convert to mysql and try.
Reply

Quote:
Originally Posted by Meller
Посмотреть сообщение
I had problem with these lines:
PHP код:
    #if defined OnPlayerCommandReceived
        
forward OnPlayerCommandReceived(playeridcmd[], params[], flags);
    
#endif 
I had to remove them in order to use Pawn.CMD.
Pawn.CMD.inc(29) : error 025: function heading differs from prototype

Edit: Pawn CMD seems to not work at all for me.
Tried 1 filterscript, 2 gamemodes.
The current includes:
PHP код:
#include <a_samp>
//Include
#include <Pawn.CMD>
#include <streamer>
#include <sscanf2>
#include <YSI\y_ini> 
Last time, you said ysi, I'll convert to mysql and try.
First post:
Quote:
Originally Posted by YourShadow
Посмотреть сообщение
Pawn.CMD.inc must be included after others "include"!
Reply


Forum Jump:


Users browsing this thread: 8 Guest(s)