Skip to content

Specialize FOR_ITER opcode #142

@GoogleCodeExporter

Description

@GoogleCodeExporter
Currently we make an indirect call to iter->ob_type->tp_iternext, we should 
specialize this for lists and tuples (and maybe dicts and sets, those would 
need extensive benchmarking).

Eventually we'll want to make it so iterating over a known type for loop 
doesn't even allocate an iterator, since it never under any circumstances 
escapes the frame, for now a good start would be just inlining the body of 
{list, tuple}iter_next

Original issue reported on code.google.com by alex.gay...@gmail.com on 22 Feb 2010 at 6:20

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions