Rewriting Old Solaris C Code In Python Yielded A 17x Performance Improvement

Shared today on Oracle's official Solaris blog was an interesting anecdote about their listusers command being rewritten in Python 3 from C. Oracle's Darren Moffat noted the C code was largely untouched since around 1988 and given its design at a time when systems were less dense than today with hundreds or even thousands of users per system.
When rewriting the "listusers" functionality in Python he did make improvements to the design, so it's not just a straight C to Python conversion yielding the speed-up. This modernized Python implementation with some of their test datasets yielded "17 times faster" performance than the existing Solaris listusers command.
Besides being much faster, the Python version took just a tenth of the number of lines of code as the old C version -- thus lowering the maintenance burden moving forward. The anecdote can be found on blogs.oracle.com.
93 Comments