use strict; use warnings; use 5.012; use Coro; use AnyEvent; use Coro::AnyEvent; my $w; $w = AE::timer 0, 1, sub { async { say "timer event" } }; for my $i (1 .. 1000000) { my $computation = $i ** $i; if ($i % 10000 == 0) { say $i; # Coro::AnyEvent::poll; # fast - ~200k iterations/sec } Coro::AnyEvent::poll; # slow - ~25k iterations/sec cede; }