tall_man has asked for the wisdom of the Perl Monks concerning the following question:
First, I took Data::Dumper output and wrapped it in a subroutine.
sub make_byteObject { # Trivial example -- the real one was about 50,000 lines. my $byteobj = bless( { 'one' => 1 }, 'byteObject' ); }
perlcc -B -o bytecode make_byteObject.pl
To use the object, I invoked the bytecode with "do" and called the subroutine:
In the example I tried, the byte-coded version loaded a tiny bit faster than the Data::Dumper version, but not significantly. Any suggestions to improve on this idea?do "bytecode"; my $obj = make_byteObject();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
•Re: Using bytecode for object serialization
by merlyn (Sage) on Sep 26, 2003 at 17:40 UTC | |
|
Re: Using bytecode for object serialization
by Ovid (Cardinal) on Sep 26, 2003 at 17:31 UTC | |
by tall_man (Parson) on Sep 26, 2003 at 18:19 UTC | |
|
Re: Using bytecode for object serialization
by demerphq (Chancellor) on Sep 26, 2003 at 18:23 UTC | |
by Starky (Chaplain) on Sep 27, 2003 at 21:26 UTC | |
by demerphq (Chancellor) on Sep 28, 2003 at 02:05 UTC | |
|
Re: Using bytecode for object serialization
by toma (Vicar) on Sep 28, 2003 at 07:41 UTC |