Eli Bendersky: Faster XML Stream Processing in Go (2019)

XML processing was popular 15 years ago but remains important in some application domains. The post compares stream-processing speed of XML files in Go, Python, and C, introducing a new module that accelerates this task for Go using C. The task involves finding occurrences of “Africa” in the tag data. Python implementations using C libraries outrun Go, leading to the question of optimizing Go’s encoding/xml package or leveraging C libraries. A custom module gosax, using Cgo to call libxml and expose a SAX interface, shows promise in speeding up XML processing in Go to match Python speeds. The post concludes with insights on Python’s performance narrative and the potential for encoding/xml performance optimization.

https://eli.thegreenplace.net/2019/faster-xml-stream-processing-in-go/

To top