Raised This Month: $ Target: $400
 0% 

pev/set_pev or entity_get/entity_set


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Sho0ter
Member
Join Date: Oct 2009
Location: Ukraine
Old 08-13-2011 , 08:58   pev/set_pev or entity_get/entity_set
Reply With Quote #1

What is faster/better?
pev/set_pev (Fakemeta) or entity_get/entity_set (Engine)?
__________________
Sry for my bad english. Im using translator.
Sho0ter is offline
Send a message via ICQ to Sho0ter Send a message via Skype™ to Sho0ter
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 08-13-2011 , 09:23   Re: pev/set_pev or entity_get/entity_set
Reply With Quote #2

entity_* should be very slightly faster, because it's like entity_get_[string,int,float] ...
__________________
xPaw is offline
abdul-rehman
Veteran Member
Join Date: Jan 2010
Location: Khi, Pakistan
Old 08-13-2011 , 09:36   Re: pev/set_pev or entity_get/entity_set
Reply With Quote #3

But this type of optimization sounds trivial.
__________________

My Plugins For ZP

Inactive due to College and Studies
abdul-rehman is offline
Send a message via Yahoo to abdul-rehman Send a message via Skype™ to abdul-rehman
aaarnas
Veteran Member
Join Date: Jun 2008
Location: Lithuania
Old 08-13-2011 , 09:48   Re: pev/set_pev or entity_get/entity_set
Reply With Quote #4

Just use, what is easier for you. It's 0.001 difference.

Use that module, witch's native is most efficient.
__________________
My plugins:
[ZP] ZM_VIP (v2.0.0 is comming. v1.9.1 BETA is out!)

aaarnas is offline
Sho0ter
Member
Join Date: Oct 2009
Location: Ukraine
Old 08-13-2011 , 10:38   Re: pev/set_pev or entity_get/entity_set
Reply With Quote #5

Quote:
Originally Posted by aaarnas View Post
Just use, what is easier for you.
I'm like Fakemeta ;)
Thanks for replies.
__________________
Sry for my bad english. Im using translator.
Sho0ter is offline
Send a message via ICQ to Sho0ter Send a message via Skype™ to Sho0ter
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 08-13-2011 , 10:55   Re: pev/set_pev or entity_get/entity_set
Reply With Quote #6

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.
__________________
Hunter-Digital is offline
Sho0ter
Member
Join Date: Oct 2009
Location: Ukraine
Old 08-13-2011 , 10:59   Re: pev/set_pev or entity_get/entity_set
Reply With Quote #7

Quote:
Originally Posted by Hunter-Digital View Post
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.
__________________
Sry for my bad english. Im using translator.
Sho0ter is offline
Send a message via ICQ to Sho0ter Send a message via Skype™ to Sho0ter
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-13-2011 , 16:44   Re: pev/set_pev or entity_get/entity_set
Reply With Quote #8

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.
__________________
fysiks is online now
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 08-13-2011 , 19:03   Re: pev/set_pev or entity_get/entity_set
Reply With Quote #9

Quote:
Originally Posted by fysiks View Post
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...
__________________
xPaw is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-13-2011 , 19:37   Re: pev/set_pev or entity_get/entity_set
Reply With Quote #10

Quote:
Originally Posted by xPaw View Post
Quote:
Originally Posted by fysiks View Post
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.
__________________
fysiks is online now
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 17:23.


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