#! perl -slw use strict; use Benchmark::Timer; use GD; my $map = GD::Image->newFromPng( '569929.png', 1 ); open POINTS, '<', '569929.points' or die $!; my $T = new Benchmark::Timer; $T->start( '5.25e6 points in 2.5e5 polys' ); while( ) { chomp; my( $x, $y ) = split ':'; my $poly = $map->getPixel($x, $y ); # printf "Point ( %4.4d, %4.4d ) found in poly: %d\n", $x, $y, $poly / 64; } $T->stop( '5.25e6 points in 2.5e5 polys' ); $T->report; close POINTS;