Python JSON encoder apples and oranges and making it faster

There are several JSON library benchmarks like this one where the built-in Python json library is not the worst performer but there are several libraries that have even up to 4x better result. Some of that might no longer be true for the latest versions of Python. But since I know a bit of Python JSON encoder, I decided to find out why there is a difference. One of the answers is that the Python…