Skip to content

Immutable components #4

@mikera

Description

@mikera

We should remove mutable state from components.

Mutable state was originally included in components for performance reasons. However this seems to be counter-productive:

  • The performance gain is probably quite small as long as mutable vectors are used to accumulate gradient values (which is the expensive mutable step)
  • It means that defensive copying of components is required for concurrent use.
  • It's generally unidiomatic in Clojure to use mutable objects

This will require some significant refactoring, but is probably worth it to improve the overall Nurokit API

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions