Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Significant speedup #1881

Merged
merged 12 commits into from
Oct 23, 2024
Merged

Significant speedup #1881

merged 12 commits into from
Oct 23, 2024

Conversation

dellaert
Copy link
Member

@dellaert dellaert commented Oct 22, 2024

Speedups across the board

In DT:

  • speed up DT conversion if labels stay

In HGC

  • remove double storage: just one tree in HGF base class
  • special constructor straight from this base class storage

In HGFG

  • prune empty graphs on the fly
  • new Result struct to eliminate double compute of negLogK
  • use new HGC constructor

Extra

  • DT method split : unused for now but could speed up if split could build only two trees instead of three; in that case, we could try building ResultTree as two trees instead, and one of them could be used to create the HGCs directly

@dellaert
Copy link
Member Author

@varunagrawal Hoping to get a quick review so I can cut an alpha version of GTSAM soon.
Before I can do that, I'd also need to ascertain whether memory leak is in GTSAM proper or in your application code. Any information on that?

Copy link
Collaborator

@varunagrawal varunagrawal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of comments but LGTM.
Removing the conditionals duplication was on my TODO list (planned to do it after figuring out memory issues) so this is great!

gtsam/hybrid/HybridGaussianFactorGraph.cpp Outdated Show resolved Hide resolved
gtsam/hybrid/HybridGaussianConditional.cpp Outdated Show resolved Hide resolved
gtsam/hybrid/HybridGaussianConditional.cpp Outdated Show resolved Hide resolved
gtsam/hybrid/HybridGaussianConditional.cpp Show resolved Hide resolved
gtsam/hybrid/HybridGaussianConditional.cpp Outdated Show resolved Hide resolved
gtsam/hybrid/HybridGaussianFactorGraph.cpp Show resolved Hide resolved
gtsam/discrete/DecisionTree.h Show resolved Hide resolved
@dellaert dellaert merged commit 366b514 into develop Oct 23, 2024
33 checks passed
@dellaert dellaert deleted the feature/no_conditionals branch October 23, 2024 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants