performance test copied from scgl