Simple but annoying and error-prone optimizations are not necessarily easy ;-) Alternatively, the author might have been not confident enough about C/C++ that a rewrite is straightforward (a hypothesis from the fact that one's Github profile doesn't have any C/C++ code).
Reusing a couple objects and packing numbers are all things you'd do in a systems language, too, except you'd have a thousand more issues to deal with.