#!/usr/local/bin/perl

use Benchmark;

use integer ;

@list_100 = ( 1 .. 100 ) ;

@list_10k = ( 1 .. 10_000 ) ;

#@list_1m = ( 1 .. 1_000_000 ) ;

timethese( 1 << 4, {

#	for_100 => sub { my @out; push( @out, $_ + 1 ) foreach @list_100 },

#	map_100 => sub { my @out; @out = map  $_ + 1, @list_100 },

	for_10k => sub { my @out; push( @out, $_ + 1 ) foreach @list_10k },

	map_10k => sub { my @out; @out = map  $_ + 1, @list_10k },

	for_10k_null => sub { my @out; push( @out, $_ ) foreach @list_10k },

	map_10k_null => sub { my @out; @out = map  $_, @list_10k },

	}
) ;
