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

Compare sparse vs. full matrix representations #8

Open
jmason42 opened this issue Dec 19, 2018 · 4 comments
Open

Compare sparse vs. full matrix representations #8

jmason42 opened this issue Dec 19, 2018 · 4 comments

Comments

@jmason42
Copy link
Contributor

SSAs, at scale, usually represent sparsely connected reaction networks. As such it's often more effective to store and access information on a per-reaction basis rather than storing a full matrix of reaction stoichiometries. This may be unproductive or even counter-productive for small systems - what we need is a large production system (e.g. WCM complexation).

@prismofeverything
Copy link
Member

I'm curious how this affects performance. Currently I have a version of complexation that uses this library, but it is a bit slower than the previous non-gillespie approach. I think performance may make or break this library. Perhaps we should take a look at the previous issues with numba as well and see if we can get compilation working.

@jmason42
Copy link
Contributor Author

Yes, I was thinking about checking out Numba today. Actually right in the middle of writing a performance issue; I also have a small PR ready that should increase performance by maybe 25%.

@jmason42
Copy link
Contributor Author

I suspect that our major performance bottleneck right now is

reactants = np.where(stoichiometry < 0)

which a sparse representation would alleviate. We could also just pre-compute that np.where call, effectively accomplishing the same thing.

@prismofeverything
Copy link
Member

Okay, back from break, this is the next thing I'm going to try : )

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

No branches or pull requests

2 participants