can someone pls benchmark this code? i cant cuz my cs is crashing with both profiling binarys
PHP Code:
#include <amxmodx>
#include <engine>
#include <fakemeta>
#define TESTS 100000
public plugin_init( )
{
register_clcmd( "say /test1", "cmdTest1" );
register_clcmd( "say /test2", "cmdTest2" );
}
public cmdTest1( plr )
{
new Float:distance;
for( new i; i < TESTS; i++ )
{
distance = entity_range( plr, 2 );
}
}
public cmdTest2( plr )
{
new Float:distance;
new Float:origin1[3], Float:origin2[3];
pev( plr, pev_origin, origin1 );
pev( 2, pev_origin, origin2 );
for( new i; i < TESTS; i++ )
{
distance = get_distance_f( origin1, origin2 );
}
}
__________________