for this code:
import sys
import gevent
from gevent import monkey
monkey.patch_all()
import requests
import urllib2
def worker(url, use_urllib2=False):
I ran your code on my machine (python 2.7.1, gevent 0.13.0, requests 0.10.6). It turned out that the time was always a good second or two faster when using the requests module . What versions are you using? An upgrade might simply solve the issue for you.
by requests: 3.7847161293 seconds
by urllib2: 4.92611193657 seconds
by requests: 2.90777993202 seconds
by urllib2: 7.99798607826 seconds