Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::General Support

Support::General Support Post all topics here having to do with errors while trying to connect to an EQEMu server but not about the setup/running of the Server itself.

Reply
 
Thread Tools Display Modes
  #1  
Old 07-25-2009, 03:46 AM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,490
Default Optimization Question

Looking at a few things with the EMU and PEQ database and had a question.

Which way would be faster if there is much difference? Assuming that about 1000 entries are read in from the database and 20% of the entries are larger than 256.

Code:
heading = db.heading;
if heading > 256 { heading = heading % 256; }
or
Code:
heading = db.heading % 256;
My initial assumption is that the if statement would require more processor use if that remains 20%. Now, if that is the difference, what if I were to reduce the entries to 0% larger than 256. Would that change the processor use in either direction?
Reply With Quote
  #2  
Old 07-25-2009, 02:56 PM
EvoZak
Sarnak
 
Join Date: May 2008
Location: Midwest
Posts: 72
Default

Have you profiled this to be an actual problem?
Reply With Quote
  #3  
Old 07-25-2009, 11:58 PM
joligario's Avatar
joligario
Developer
 
Join Date: Mar 2003
Posts: 1,490
Default

No, but with 18600+ entries in the database being 256+, I would assume that it would take some calculations. That's why I was wondering what the difference would be, if any. If it doesn't matter, I wouldn't recommend a change. After PEQ comes back up, I will still change all the headings. I was just checking if any processor power went into it.
Reply With Quote
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 06:02 PM.


 

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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3