Facilitate protocol static dispatch inlining

Description

The code generated by defprotocol involves functions that first check if static dispatch is possible, followed by falling back to other dynamic dispatch cases.

With a little rearrangement, it is possible to collect the (bulky) dynamic dispatch cases into a separate function that is called only when needed, thus making the top-level dispatch function smaller and inlineable, improving performance in the usual case where static dispatch is possible, and only slightly slowing things down in the slower dynamic dispatch case.

Environment

None

Status

Assignee

Mike Fikes

Reporter

Mike Fikes

Labels

None

Approval

None

Patch

None

Priority

Major
Configure