allegro optimizations