speeding up JSON parsing in Perl
json, performance, perl
Solution
Try to install JSON::XS. Then, "use JSON" automatically uses the XS version. This module was written in C, and it has a very good performance.
Problem
I've been using the JSON package in a perl script that parses a long list of relatively short JSON strings and I profiled the process with Devel::NYTProf. It seems like most of the time is taken by the JSON `string` function in the parsing process. Are there any speed-ups that I could use other than not using the JSON package and try to speed it up by parsing it myself? EDIT: The JSON package was installed in the system using `cpanm`. If there are any speed-ups to be gained by optimizing the installation process, they are also welcomed.