AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   pev/set_pev or entity_get/entity_set (https://forums.alliedmods.net/showthread.php?t=164583)

Sho0ter 08-13-2011 08:58

pev/set_pev or entity_get/entity_set
 
What is faster/better?
pev/set_pev (Fakemeta) or entity_get/entity_set (Engine)?

xPaw 08-13-2011 09:23

Re: pev/set_pev or entity_get/entity_set
 
entity_* should be very slightly faster, because it's like entity_get_[string,int,float] ...

abdul-rehman 08-13-2011 09:36

Re: pev/set_pev or entity_get/entity_set
 
But this type of optimization sounds trivial.

aaarnas 08-13-2011 09:48

Re: pev/set_pev or entity_get/entity_set
 
Just use, what is easier for you. It's 0.001 difference.

Use that module, witch's native is most efficient.

Sho0ter 08-13-2011 10:38

Re: pev/set_pev or entity_get/entity_set
 
Quote:

Originally Posted by aaarnas (Post 1531651)
Just use, what is easier for you.

I'm like Fakemeta ;)
Thanks for replies.

Hunter-Digital 08-13-2011 10:55

Re: pev/set_pev or entity_get/entity_set
 
Still, you should understand that if a engine native cand do it from one call and fakemeta can do it with 2+ calls, it's better to use the engine native, even if you use fakemeta stuff everywhere.

For example, fm_* stocks from fakemeta utils does the same thing only slower than their engine counterparts, so it's better just to use engine for them.

Sho0ter 08-13-2011 10:59

Re: pev/set_pev or entity_get/entity_set
 
Quote:

Originally Posted by Hunter-Digital (Post 1531693)
Still, you should understand that if a engine native cand do it from one call and fakemeta can do it with 2+ calls, it's better to use the engine native, even if you use fakemeta stuff everywhere.

For example, fm_* stocks from fakemeta utils does the same thing only slower than their engine counterparts, so it's better just to use engine for them.

I know that and asked about the specific functions.

fysiks 08-13-2011 16:44

Re: pev/set_pev or entity_get/entity_set
 
I would say that if you don't have the more efficient method memorized then just get it working then and can optimize later on such a trivial situation.

xPaw 08-13-2011 19:03

Re: pev/set_pev or entity_get/entity_set
 
Quote:

Originally Posted by fysiks (Post 1531915)
I would say that if you don't have the more efficient method memorized then just get it working then and can optimize later on such a trivial situation.

It's easier to write such trivial things from beginning. It's not really worth changing [set_]pev to entity_[g/s]et at later stages...

fysiks 08-13-2011 19:37

Re: pev/set_pev or entity_get/entity_set
 
Quote:

Originally Posted by xPaw (Post 1531989)
Quote:

Originally Posted by fysiks (Post 1531915)
I would say that if you don't have the more efficient method memorized then just get it working then and can optimize later on such a trivial situation.

It's easier to write such trivial things from beginning. It's not really worth changing [set_]pev to entity_[g/s]et at later stages...

See bold text.

I like to have something working so that I can debug other things that are more important so I use what I know works then can choose to either optimize or not depending on my knowledge and relavence.


All times are GMT -4. The time now is 03:24.

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