Tries optimization for mobile