in reply to The Upper Limit of Perl's Native Data Structures
Eats up about 430 Mb on my machine: perl v5.8.0 built for i386-linux-thread-multi.#!/usr/bin/perl -w use strict; $|=1; my @nodes; for (1 .. 3000) { push @nodes,{ number => $_ }; print "\r$_" unless $_ % 1000; } my @edges; for (0 .. 2500000) { push @edges,{ s => \ $nodes[$_ % 3000], d => \ $nodes[3000 - $_ % +3000] }; print "\r$_" unless $_ % 1000; } print "\ndone, press enter to exit"; my $dummy = <STDIN>;
It's not super-fast, but it still works. However, how much memory Graph::Directed objects will take, and how long operations on the graphs will take is something you'll have to test for yourself.
Joost.
-- #!/usr/bin/perl -np BEGIN{@ARGV=$0}s(^([^=].*)|=)()s; =Just another perl hacker\
|
|---|