Skip to content

Removed unused variables and changed other used variables to better suited types#13

Open
NotAGameDev07 wants to merge 1 commit intoSpikeViper:masterfrom
NotAGameDev07:changes
Open

Removed unused variables and changed other used variables to better suited types#13
NotAGameDev07 wants to merge 1 commit intoSpikeViper:masterfrom
NotAGameDev07:changes

Conversation

@NotAGameDev07
Copy link
Copy Markdown

"int" should not be used as it takes 4 bytes and values do not go above 2 ** 16 therefore changing to short, unsigned char, unsigned short, signed char, etc is better suited due to all values using at most 2 bytes.

@NotAGameDev07
Copy link
Copy Markdown
Author

NotAGameDev07 commented Sep 27, 2022

this should save a few microseconds/milliseconds, I also might try to change some compiler flags to use -O3 for gcc/g++ due to speed improvements, also I recommend MinGW as gcc/g++ on windows is 3 times faster than MSVC/MSVC++ at runtime and/or compilation-time, sources are applications (that have windows and linux versions) running on same hardware on windows vs linux.

@aarrbba123
Copy link
Copy Markdown

don't forget biodata struct, since it also uses integers too.
although i'm a bit scared with overflows, since some of us (like me) like to put values way past the 16-bit integer limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants