Skip to content

BhargavKadali39/finding-size-of-objects

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

finding-memory-size-of-objects

Finding how much memory does a object consume.

Today's repo is about finding how much memory a object in python consumes.

So the takeaway is while programming in python you can know how much difference it's makes and so0 choosing right data type could possibly lead to a clean and optimized code.

code

size_1 = ["I","am","groot"]
size_2 = ("I","am","groot")

here we took a list and a tuple let's find out how much memory they consume for same amount of data.

output:

size of list: 120
size of tuple: 64

The below are some of my work which can help you design more optimized code

About

Finding how much memory does an object consumes.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages