Skip to content

Parallelize the Cranelift compilation loop #56

@sunfishcode

Description

@sunfishcode

The loop in compile_module in lib/environ/src/cranelift.rs iterates over all the functions in a module, compiling one at a time. Cranelift is designed to compile each function independently (and we've demonstrated it doing so in SpiderMonkey), so this loop ought to be relatively straightforward to parallelize. In the Rust ecosystem, the Rayon framework is the obvious choice for simple parallelization of loops like this. The main work will be arranging places to put the outputs (currently the functions and relocations vector elements).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions