human
Solve the following python programming problem given the following code:
# An object
class GrepHandler(object):
    def __init__(self,pattern, target):
        self.pattern = pattern
        self.target = target
    def send(self,line):
        if self.pattern in line:
            self.target.send(line)

# A coroutine
@consumer
def grep(pattern,target):
    while True:
        line = (yield)
        if pattern in line:
            target.send(line)

# A null-sink to send data
@consumer
def null(): 
    while True: item = (yield)

# A benchmark
line = 'python is nice'
p1   = grep('python',null())          # Coroutine
p2   = GrepHandler('python',null())   # Object

from timeit import timeit

print "coroutine:", timeit("p1.send(line)", "from __main__ import line, p1")

print "object:", timeit("p2.send(line)", "from __main__ import line, p2")

%timeit p1.send(line)
Given the above code, generate some markdown instructions for it.
assistant
#Here is Python program to print "coroutine:", timeit("p1.

Are generators fast for data flow?

Lets start with Beazely's <a href="http://www.dabeaz.com/coroutines/benchmark.py" target="_blank">Benchmark</a> example