Rewritten rollsum as a C extension with swig.