Changes between Version 71 and Version 72 of DeveloperGuidelines/Optimisation


Ignore:
Timestamp:
11/18/11 12:20:10 (10 years ago)
Author:
Mike A
Comment:

code formatting for slots notes

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperGuidelines/Optimisation

    v71 v72  
    1616 * http://diveintopython.org/performance_tuning/index.html
    1717 * If a specific inner-loop routine cannot be optimised in Python, then consider writing a C routine for this use case.
    18  * If Python is eating too much memory, it could be because you are instantiating lots of a particular class, consider using __slots__ http://stackoverflow.com/questions/472000/python-slots
    19  * You can check the actual memory usage per class using MyClass.__basicsize__, remembering that subclasses of classes without __slots__ or top-level classes without __slots__ have a __dict__ which also takes up memory.
     18 * If Python is eating too much memory, it could be because you are instantiating lots of a particular class, consider using {{{__slots__}}} http://stackoverflow.com/questions/472000/python-slots
     19 * You can check the actual memory usage per class using {{{MyClass.__basicsize__}}}, remembering that subclasses of classes without {{{__slots__}}} or top-level classes without {{{__slots__}}} have a {{{__dict__}}} which also takes up memory.
    2020
    2121 ''You can't beat C with Python, unless it's about readability.''