Speed improvement for Python spikequeue, may not be working properly yet