qi icon indicating copy to clipboard operation
qi copied to clipboard

Arity inference compiler pass

Open countvajhula opened this issue 1 year ago • 0 comments

Qi in many cases does not distinguish variadic functions from fixed-arity functions. We may be able to infer the appropriate arity in practice, and apply these functions to a specific number of arguments instead of an arbitrary number, as this would be faster.

This could be done by building a table of known arities of built-in APIs that would be available to the compiler, and there may be other, generally-applicable, ways as well.

See also: Compiler Optimizations Optimizations Next Optimizations

countvajhula avatar Jan 26 '24 10:01 countvajhula