Naturally, I assumed that a C++ solution would outperform Python in this scenario. However, I questioned whether the difference justified the development effort. The engineer was adamant that it did. Intrigued, I chose to conduct a small benchmark to test this claim.
I measure how many times a second each solution can query the content of a small JSON file. I use my macBook (M2) with Apple LLVM 15 and Python 3.12.
Daniel Lemire, "It is never too later to write your own C/C++ command-line utilities," in Daniel Lemire's blog, September 28, 2024, https://lemire.me/blog/2024/09/28/it-is-never-too-later-to-write-your-own-c-c-command-line-utilities/.