NAME

Doubly::Linked::PP - linked lists

VERSION

Version 0.05

SYNOPSIS

use Doubly::Linked::PP;

my $list = Doubly->new();

$list->bulk_add(1..100000);

$list->data; # 1;

$list->length; # 100000;

$list = $list->end;

$list->data; # 100000;

$list->prev->data; # 99999;

BENCHMARK

use Benchmark qw(:all :hireswallclock);
use lib '.';
use Doubly::Linked::PP;
use Doubly::Linked;
use Doubly;
my $r = timethese(2000000, {
	'Doubly::Linked::PP' => sub {
		my $linked = Doubly::Linked::PP->new(123);
		$linked->bulk_add(0..10);
		$linked = $linked->end;
		$linked->is_end;
		$linked = $linked->start;
		$linked->is_start;
		$linked->add(789);
	},
	'Doubly::Linked' => sub {
		my $linked = Doubly::Linked->new(123);
		$linked->bulk_add(0..10);
		$linked = $linked->end;
		$linked->is_end;
		$linked = $linked->start;
		$linked->is_start;
		$linked->add(789);
	},
	'Doubly' => sub {
		my $linked = Doubly->new(123);
		$linked->bulk_add(0..10);
		$linked = $linked->end;
		$linked->is_end;
		$linked = $linked->start;
		$linked->is_start;
		$linked->add(789);
	}
});

cmpthese $r;

----

Benchmark: timing 2000000 iterations of Doubly, Doubly::Linked, Doubly::Linked::PP...
    Doubly: 1.70335 wallclock secs ( 1.62 usr +  0.08 sys =  1.70 CPU) @ 1176470.59/s (n=2000000)
Doubly::Linked: 7.49174 wallclock secs ( 7.04 usr +  0.44 sys =  7.48 CPU) @ 267379.68/s (n=2000000)
Doubly::Linked::PP: 26.0622 wallclock secs (25.32 usr +  0.56 sys = 25.88 CPU) @ 77279.75/s (n=2000000)
			Rate Doubly::Linked::PP  Doubly::Linked           Doubly
Doubly::Linked::PP   77280/s                 --            -71%             -93%
Doubly::Linked      267380/s               246%              --             -77%
Doubly             1176471/s              1422%            340%               --

SEE ALSO

Doubly

Doubly::Linked

AUTHOR

LNATION, <email at lnation.org>

BUGS

Please report any bugs or feature requests to bug-doubly-linked-pp at rt.cpan.org, or through the web interface at https://rt.cpan.org/NoAuth/ReportBug.html?Queue=Doubly-Linked-PP. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc Doubly::Linked::PP

You can also look for information at:

ACKNOWLEDGEMENTS

LICENSE AND COPYRIGHT

This software is Copyright (c) 2025 by LNATION.

This is free software, licensed under:

The Artistic License 2.0 (GPL Compatible)