I haven't written any benchmark, but I assume this would be the bottleneck. I made this tool for a small CLI utility not concerned about performance.
I'd be happy to receive recommendations (and even PRs) though.
Reply on news.ycombinator.com