PackmanDude / pridefetch-in-c

🏳️‍🌈🏳️‍⚧️ Neofetch, but with flags.
https://github.com/PackmanDude/pridefetch-in-c
GNU General Public License v3.0
0 stars 0 forks source link

Store chosen flags more memory efficiently #6

Open PackmanDude opened 4 months ago

PackmanDude commented 4 months ago

The current approach is storing copies of physical addresses, which could be considered an array of uintptr_t. Previously, an array of size_t was used instead, but additional dereferencing caused an overhead.

PackmanDude commented 4 months ago

Also, storing each individual index is not efficient. Better would be to implement it with something like a struct holding an index of the flag in a static array and its count to calculate percentages accurately without holding too much in memory.