Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » U++ Developers corner » Know what you're using. Size of some common types.
Re: Know what you're using. Size of some common types. [message #57975 is a reply to message #57974] Fri, 07 January 2022 17:44 Go to previous messageGo to previous message
Lance is currently offline  Lance
Messages: 527
Registered: March 2007
Contributor
Assuming the proposed data reorganization for Ctrl and Pusher & Button are both applied, sizeof(Button) will be reduced 16 bytes from 224 to 208 (on 64bit platforms). By ridding of the 4 contained Buttons, each ScrollBar object will be using 4x204=832 less bytes.

Use second case of uppsrc/ide on 64 bit platform for example, compacting Ctrl to save 8 bytes each will have a total memory saving of 22001x8=176,008 bytes. The new ScrollBar implementation will have an incremental memory saving of 2181x832=1,814,592 bytes.

I am not saying 2M or even 10M of memory saving will make much a difference in now-a-days hardware, but reducing sizeof(ScrollBar) to 1/5 of what it is (actually even less) might not be less important than reducing sizeof(Ctrl) by 8 - 24 bytes from practical persperctive.

[Updated on: Fri, 07 January 2022 18:18]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [SOLVED][Question] Is anyone able to build UPP and Binaries based upon it as 32-Bit?
Next Topic: Source Code Efficiency Minor Issue
Goto Forum:
  


Current Time: Fri May 03 23:50:07 CEST 2024

Total time taken to generate the page: 0.02933 seconds