Skip to content

Latest commit

 

History

History
9 lines (7 loc) · 361 Bytes

7c5x-self-_-_init-_-_-and-hash-tables.md

File metadata and controls

9 lines (7 loc) · 361 Bytes

self.init and hash tables

#python #efficiency #programming #language

  • A class is store in hash table
  • Instance variables and classes variables shared small space on the memory

[!tip] Performance Avoid create attribute outside of method self.__init__ because a new hash table is necessary. It make the program to use almost 10%-20% less memory