mgetl() optimizations.