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

Development::Feature Requests Post suggestions/feature requests here.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 10-10-2008, 07:16 PM
Rocker8956
Hill Giant
 
Join Date: Sep 2007
Posts: 117
Default Trimming variable fat

This is probably an amateur coder question but I am an amateur coder so…
I was looking through some of my recent code submissions and noticed I use int in places uint8 or uint16 would suffice. Would it be worth going through the code and trimming the fat on some of the variables?

Also, does a uint8 process faster and use less memory than a uint16?

Here is my list of variables I think could be trimmed (if you can think of more please let me know)

Code:
Reference	Type		Min	Max
Level 		uint8 		0 	255
ZoneID 		uint16 		0  	65535
charID 		uint16 		0 	65535 
accountID 	uint16 	 	0 	65535 
spawnID 	uint32 		0 	4294967295
Regarding accountID and charID, I doubt a server should ever reach 65535 accounts/characters in its database. Am I wrong?

I am willing to look through the code and make the changes. Just want to be certain I am not wasting my time or messing something up.
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 02:43 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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3