Cache numSegments and numSynapses for performance