Browse files

deleted eg/*

  • Loading branch information...
1 parent 15579f3 commit c5d5eec0d8a9f84bb2da3b63dca6b15810a87323 @makamaka committed Nov 28, 2010
Showing with 0 additions and 156 deletions.
  1. +0 −70 eg/bench_decode.pl
  2. +0 −86 eg/bench_encode.pl
View
70 eg/bench_decode.pl
@@ -1,70 +0,0 @@
-#!/usr/bin/perl
-
-use strict;
-use warnings;
-use Benchmark qw( cmpthese timethese );
-
-our $VERSION = '1.00';
-
-my $wanttime = $ARGV[1] || 5;
-
-use JSON qw( -support_by_pp -no_export ); # for JSON::PP::Boolean inheritance
-use JSON::PP ();
-use JSON::XS ();
-use utf8;
-
-my $pp = JSON::PP->new->utf8;
-my $xs = JSON::XS->new->utf8;
-
-local $/;
-
-my $json = <>;
-my $perl = JSON::XS::decode_json $json;
-my $result;
-
-
-printf( "JSON::PP %s\n", JSON::PP->VERSION );
-printf( "JSON::XS %s\n", JSON::XS->VERSION );
-
-
-print "-----------------------------------\n";
-print "->decode()\n";
-print "-----------------------------------\n";
-
-$result = timethese( -$wanttime,
- {
- 'JSON::PP' => sub { $pp->decode( $json ) },
- 'JSON::XS' => sub { $xs->decode( $json ) },
- },
- 'none'
-);
-cmpthese( $result );
-
-print "-----------------------------------\n";
-
-
-__END__
-
-=pod
-
-=head1 SYNOPSYS
-
- bench_decode.pl json-file
- # or
- bench_decode.pl json-file minimum-time
-
-=head1 DESCRIPTION
-
-L<JSON::PP> and L<JSON::XS> decoding benchmark.
-
-=head1 AUTHOR
-
-makamaka
-
-=head1 LISENCE
-
-This library is free software; you can redistribute it and/or modify it
-under the same terms as Perl itself.
-
-=cut
-
View
86 eg/bench_encode.pl
@@ -1,86 +0,0 @@
-#!/usr/bin/perl
-
-use strict;
-use warnings;
-use Benchmark qw( cmpthese timethese );
-
-our $VERSION = '1.00';
-
-my $wanttime = $ARGV[1] || 5;
-
-use JSON qw( -support_by_pp -no_export ); # for JSON::PP::Boolean inheritance
-use JSON::PP ();
-use JSON::XS ();
-use utf8;
-
-my $pp = JSON::PP->new->utf8;
-my $xs = JSON::XS->new->utf8;
-
-local $/;
-
-my $json = <>;
-my $perl = JSON::XS::decode_json $json;
-my $result;
-
-
-printf( "JSON::PP %s\n", JSON::PP->VERSION );
-printf( "JSON::XS %s\n", JSON::XS->VERSION );
-
-
-print "-----------------------------------\n";
-print "->encode()\n";
-print "-----------------------------------\n";
-
-$result = timethese( -$wanttime,
- {
- 'JSON::PP' => sub { $pp->encode( $perl ) },
- 'JSON::XS' => sub { $xs->encode( $perl ) },
- },
- 'none'
-);
-cmpthese( $result );
-
-print "-----------------------------------\n";
-print "->pretty->canonical->encode()\n";
-print "-----------------------------------\n";
-
-$pp->pretty->canonical;
-$xs->pretty->canonical;
-
-$result = timethese( -$wanttime,
- {
- 'JSON::PP' => sub { $pp->encode( $perl ) },
- 'JSON::XS' => sub { $xs->encode( $perl ) },
- },
- 'none'
-);
-cmpthese( $result );
-
-print "-----------------------------------\n";
-
-
-__END__
-
-=pod
-
-=head1 SYNOPSYS
-
- bench_encode.pl json-file
- # or
- bench_encode.pl json-file minimum-time
-
-=head1 DESCRIPTION
-
-L<JSON::PP> and L<JSON::XS> encoding benchmark.
-
-=head1 AUTHOR
-
-makamaka
-
-=head1 LISENCE
-
-This library is free software; you can redistribute it and/or modify it
-under the same terms as Perl itself.
-
-=cut
-

0 comments on commit c5d5eec

Please sign in to comment.