Skip to content

Commit

Permalink
Use a deque to build up signal sinks
Browse files Browse the repository at this point in the history
This should reduce the build time.
  • Loading branch information
mundya committed Jan 24, 2017
1 parent 21c7534 commit 1585201
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nengo_spinnaker/builder/builder.py
Expand Up @@ -390,7 +390,7 @@ def make_netlist(self, *args, **kwargs):
# Add the source to the final list of sources
sources.append(source)

sinks = collections_ext.flatinsertionlist()
sinks = collections.deque()
for sink in signal.sinks:
# Get all the sink vertices
sink_vertices = operator_vertices[sink]
Expand All @@ -400,7 +400,7 @@ def make_netlist(self, *args, **kwargs):
# Include any sinks which either don't have an `accepts_signal`
# method or return true when this is called with the signal and
# transmission parameters.
sinks.append(s for s in sink_vertices if
sinks.extend(s for s in sink_vertices if
not hasattr(s, "accepts_signal") or
s.accepts_signal(signal, transmission_parameters))

Expand Down

0 comments on commit 1585201

Please sign in to comment.