Raised This Month: $ Target: $400
 0% 

benchmark/profiling entity_range() and get_distance_f() with cached origins


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 04-02-2009 , 16:00   Re: benchmark/profiling entity_range() and get_distance_f() with cached origins
Reply With Quote #1

PHP Code:
public cmdTest1plr )
{
    new 
entmaxents global_getglb_maxEntities )
    for(
ent get_maxplayers()+1ent<maxentsent++)
    {
        if( 
pev_valid(ent) )
        {
            break
        }
    }

    new 
Float:origin1[3], Float:origin2[3];
    
pevplrpev_originorigin1 );
    
peventpev_originorigin2 );

    for( new 
iTESTSi++ )
    {
        
entity_rangeplrent );
        
get_distance_forigin1origin2 )
    }

Code:
date: Thu Apr 02 21:58:59 2009 map: de_dust2
type |                             name |      calls | time / min / max
-------------------------------------------------------------------
   n |                   register_clcmd |          1 | 0.000004 / 0.000004 / 0.000004
   n |                       global_get |          1 | 0.000001 / 0.000001 / 0.000001
   n |                   get_maxplayers |          1 | 0.000000 / 0.000000 / 0.000000
   n |                        pev_valid |          1 | 0.000001 / 0.000001 / 0.000001
   n |                              pev |          2 | 0.000002 / 0.000000 / 0.000001
   n |                     entity_range |     100000 | 0.022782 / 0.000000 / 0.000086
   n |                   get_distance_f |     100000 | 0.021839 / 0.000000 / 0.000060
   p |                         cmdTest1 |          1 | 0.038927 / 0.038927 / 0.038927
   p |                      plugin_init |          1 | 0.000001 / 0.000001 / 0.000001
0 natives, 0 public callbacks, 2 function calls were not executed.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:17.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode