Newly added code from #609 introduces python htm.advanced.algorithms.Connections which is a wrapper to bindings' Connections with a few extra methods.
The bottleneck is in listing all the presynaptic cells of a segment which I implemented as presynamptic_cells = np.array([permanences.presynapticCellForSynapse(synapse) for synapse in permanences.synapsesForSegment(segment)]
This is called many, many times and hence takes 25% of the run time. ~fcr
Newly added code from #609 introduces python
htm.advanced.algorithms.Connectionswhich is a wrapper tobindings' Connections with a few extra methods.presynaptic cellsfrom Connections is needed:Currently done as (slow):