Skip to content

ZJIT: Specialize send with caller_splat #1004

Description

@k0kubun

On liquid-render,

Top-14 send fallback reasons (100.0% of total 397,638):
                          send_without_block_no_profiles: 93,590 (23.5%)
                             invokeblock_not_specialized: 87,975 (22.1%)
                          send_without_block_polymorphic: 63,841 (16.1%)
                            one_or_more_complex_arg_pass: 45,114 (11.3%)
                                        send_no_profiles: 37,455 ( 9.4%)
                                        send_polymorphic: 34,957 ( 8.8%)
Top-3 popular complex argument-parameter features not optimized (100.0% of total 45,114):
     caller_splat: 40,469 (89.7%)
  caller_blockarg:  3,352 ( 7.4%)
       param_rest:  1,293 ( 2.9%)

caller_splat accounts for about 90% of the one_or_more_complex_arg_pass fallback reason.

TODO

  1. Specialize send with caller_splat
  2. Investigate whether there are caller array allocations we can optimize away if the array allocation and the callee are inlined
  3. Consider optimizing away such array allocation
    • We need to make sure the array doesn't escape

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions