>
>
>> The micro benchmark is just that, and is not as far as I can see testing
> the sort of iterating process that would happen normally when going through
> a data set. It simply times the iterator, but does not compare like with
> like!
>
> I hear your concerns about performance, and you're good to have them.  So
to look at a real-world code base, I'd offer Facebook where we transformed
our data fetching classes from a form of iterator to use generators.  The
result (exclusive of underlying data fetch) was nearly even, with a slight
gain on the side of generators (sadly no, I can't share the raw data with
you).

Of course, this is also meaningless since we're talking about the HipHop
implementation of generators and not PHP's, but there you go.

-Sara

Reply via email to