Improved memory efficiency for search