http://www.perlmonks.org?node_id=732520


in reply to Re: Creating Storable objects from the C
in thread Creating Storable objects from the C

Just adding to this JSON::XS was faster than Storable in the last benchmark I saw/ran. Benchmarks can be misleading (size, data, versions) but even if it's not faster it's probably roughly as fast and if there are C libs available it would be easy to see if it worked well for you.

  • Comment on Re^2: Creating Storable objects from the C

Replies are listed 'Best First'.
Re^3: Creating Storable objects from the C
by diotalevi (Canon) on Dec 25, 2008 at 08:49 UTC

    In the last benchmark I ran, Storable was faster than JSON::XS, fwiw.

    ⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

      Yep, in my benchmark JSON::XS was faster than Storable too. Fun, I saw this module before several times, but always stopped reading doc just after "JavaScript" words thinking that this is something useless for me.

      Update: In case somebody interested, here's the results of testing for some serializing engines. I've just got simple XML example from wikipedia, encoded it using different methods and benchmarked the parsers.

      Here's the code:

      And here's the result:

      Rate XML::Simple XML::Twig YAML::Syck Data::Dumper Sto +rable JSON::XS XML::Simple 422/s -- -24% -96% -97% + -99% -99% XML::Twig 556/s 32% -- -95% -96% + -99% -99% YAML::Syck 11622/s 2652% 1989% -- -11% + -81% -84% Data::Dumper 13039/s 2988% 2244% 12% -- + -79% -82% Storable 60964/s 14335% 10859% 425% 368% + -- -18% JSON::XS 74479/s 17535% 13289% 541% 471% + 22% --