Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
eigen
eigen
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 589
    • Issues 589
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Custom Issue Tracker
    • Custom Issue Tracker
  • Merge Requests 18
    • Merge Requests 18
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • libeigen
  • eigeneigen
  • Issues
  • #789

Closed
Open
Opened Dec 04, 2019 by Eigen Bugzilla@eigenbzMaintainer

Feature Request: Memory allocation only when necessary

Submitted by Piotr Trebisz

Assigned to Nobody

Link to original bugzilla bug (#789)

Description

Hello,
I'm Piotr Trebisz from the GFaI e.V. institute in Berlin. I work as a software developer in the 3D-Data-Processing departement of the institute. We decided to use "Eigen" because we are tired of spending time on writing our own numerical methods and Eigen seems to yield good results in terms of accuracy.
But we also identified a little performance issue: Eigen frees and allocates memory on every matrix resize, on every computation of a matrix decomposition and on every other change of an objects size, and that costs some time. If you only want to solve 1 or just a few equation systems, then it's not a problem. But our programms often have to solve some 100.000 to some 1.000.000 equation systems whose dimensions vary from iteration step to iteration step.
Freeing and allocating bigger matrices, vectors and matrix-decomposition-objects 100.000 to 1.000.000 times has a negative impact on performance. Therefore in our departement and in many other scientific institutions it is regarded as best practice in numerical algorithms to allocate new memory only when the old memory is not big enough. When an object shrinks, the memory is keept and not freed. Our objects have an extra method called "FreeExtra" if one explicitly wants to free unused memory.
With Eigen's map-templates it is possible to manage the memory of matrices and vectors by our own. But it is not possible to do so with all the other objects like JacobiSVD- and HouseholderQR-Decompositions. Therefore we would like to know if you could think about our suggestion and consider such a memory management for future Eigen releases.

Best Regards
Piotr Trebisz

Depends on

#707 (closed)

Edited Dec 05, 2019 by Eigen Bugzilla
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: libeigen/eigen#789