Memory optimization - test