improve log parser performance using cython