Improved mgen compiler speed