Skip to content

Feature: Prepare transform function calls across the standard library #1028

Open

Description

@timggggggg

Is your feature request related to a problem? Please describe.

Transform repeats function lookup and argument binding for every executed function call, even though the function name and argument layout are fixed by the program.

The current execution path is:

CallExpr.Eval
  -> evaluate and materialize arguments
  -> build positional arguments and a named-argument map
Context.CallFunc
  -> look up the function by name
CompiledFunc.Resolve
  -> create a parameter map, bind arguments, and check types
Function.Call
  -> read parameters by name and perform the operation

Function signatures are already cached at registration. The remaining repeated work is binding each call to that signature and passing values through temporary containers and string-keyed maps.

For short operations such as before and trim_right, this adds CPU work and allocations around the string operation. Nested calls repeat these costs within the same event.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions