add spacetest
improve memory use in the absence of -O2