in reply to Using bytecode for object serialization

Data::Dumper will be relatively slow to restore, because it has to first compile the Perl code, and then execute the code to allocate all the appropriate references and scalars.

But I'm surprised you say that Storable isn't fast enough! That's doing just about as little as you can and still end up with Perl data structures. If you need something faster, perhaps you'll need to drop into C code that you can call from Inline::C or something.

Also, if it's really that large, and yet loading time is important, perhaps you are loading it too often, and it belongs in a real database. Consider the use of DBD::SQLite to access just the parts of the data that you need for a particular program invocation.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

  • Comment on •Re: Using bytecode for object serialization