Or rewrite most of it into small, quick C (or similar) - so it could be ported to other architectures easily. Overall size would be the major factor in speed and memory efficiency - rather than coding language.
>>drpixi+(OP)
Fun fact, the earliest versions of UNIX were, in fact, written in assembler, and rewritten piecewise into the bootstrapped "C" language, partially for portability (and sanity's) sake.