Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 01-13-2005, 02:46 AM
Yodason
Hill Giant
 
Join Date: Jan 2002
Posts: 205
Default

I normally don't bother posting to these boards, but this is a interesting topic I like talking about. =) The real key is that you shouldn't be trying to optimize little syntaxtical things. Thats what the compiler is good for. Don't go through a ton of extra effort trying to optimize UNLESS you've already run a profiller such as vtune or what not. Chances are what you are trying to optimize is really negligable. Virtual points for example are a single pointer lookup. Granted, thats not something you want in a vector3 class or what not, but in a mob class its perfectly fine and will not effect performance at all. I don't see why a multidimensional array would have a high perforamncee penalty, but if it does just put it into a 1d array and offset by the col length. Inline is highly desirable, but remember its just a suggestion, the compiler doesn't nessesarily follow it. It does help some things (like vector classes. get variable functions, etc) but by and large if your doing stuff with loops or if statements, there isn't going to be a performance gain worth rewriting for even if the compiler does inline it. Feel free to use function pointers, I doubt what you are doing will have any effect and may even slow things down by not using them. THE BEST place to optimize is algorithms : I remember I once killed aoe lag disconnect here by just moving a single check for valid target before a huge switch loop. THATS where you make gains, not these little tweaks. I HIGHLY recommend getting a profiler like intel vtune before you do ANY optimizing at this level. I guarentee that there are much "sweeter" spots to optimize in eqemu then worrying about the performance of one pointer lookup (which is all a virtual function is. Its virtually (pardon the pun) free for 99.9% of cases). I hope this answered your question.
Reply With Quote
 


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 04:44 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3