Changes between Version 2 and Version 3 of Ticket #30302, comment 21


Ignore:
Timestamp:
08/07/20 16:00:34 (2 years ago)
Author:
gh-mjungmath
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #30302, comment 21

    v2 v3  
    1919I just overread this tiny but important part.
    2020
    21 What about simply making those `Components` immutable which are bound to tensors? Similar as my proposal in comment:19. Each time the components of a tensor are changed via `set_comp` or `add_comp`, a whole new `Component` is created from scratch (`self._new_comp` is invoked). Making those components immutable which are used for tensors, wouldn't change much. Then we don't have to copy whole components anymore.
     21What about simply making those `Components` immutable which are bound to tensors? Similar as my proposal in comment:19. Each time the components of a tensor are changed via `set_comp` or `add_comp`, a whole new `Component` is created from scratch (`self._new_comp` is invoked). Making those components immutable which are used for tensors, wouldn't change much. Then we don't have to copy whole `Components` anymore.