# Size of Programming Objects

**URL:** <https://community.dynatrace.com/t/size-of-programming-objects/37371>\
**Category:** Dynatrace Tips\
**Tags:** tips-and-tricks\
**Created:** [November 20, 2022, 8:12pm UTC](https://community.dynatrace.com/t/size-of-programming-objects/37371 "2022-11-20T20:12:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AntonioSousa](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antoniosousa/32/50_2.png) [@AntonioSousa](https://community.dynatrace.com/u/AntonioSousa)\
**Post date:** [November 20, 2022, 8:12pm UTC](https://community.dynatrace.com/t/size-of-programming-objects/37371/1 "2022-11-20T20:12:18Z")

</div>

This is a tip not about Dynatrace, but about how many memory our programming languages use today.

One of the biggest surprises is how much memory even simple types use. Consider the following languages:

- JAVA (64 bits)
  - A Boolean takes 16 bytes!
  - An Integer also takes 16 bytes
  - A double takes 24 bytes
  - Link: [The Size of Java Objects](https://www.justinblank.com/notebooks/javaobjectsize.html)

- Python 3
  - A float takes 24 bytes…
  - A Boolean takes 28 bytes!
  - An integer takes 28 bytes
  - A string “1” takes 50 bytes!!!
  - Link: [Understand How Much Memory Your Python Objects Use | Envato Tuts+](https://code.tutsplus.com/tutorials/understand-how-much-memory-your-python-objects-use--cms-25609)

Didn’t find a quick link for .Net, but it’s similar. Of course, C & Assembly are another story…

There are tricks around this, but as it goes, memory usage is surprisingly high in today’s environments…

---

<div class="post-metadata">

**Author:** ![ChadTurner](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/chadturner/32/161_2.png) [@ChadTurner](https://community.dynatrace.com/u/ChadTurner)\
**Post date:** [January 10, 2023, 9:06pm UTC](https://community.dynatrace.com/t/size-of-programming-objects/37371/2 "2023-01-10T21:06:37Z")

</div>

thanks for laying this out&nbsp;[@AntonioSousa](https://community.dynatrace.com/user/17213)
