Skip to content

s/fn validation has extra overhead #450

Description

@frenchy64

The (@~input-checker-sym args#) in the input checker code could be faster in the most common case without a rest argument and be more like (@~input-checker-sym ~@bind-syms).

(when-let [error# (@~input-checker-sym args#)]
  (error! (utils/format* "Input to %s does not match schema: \n\n\t \033[0;33m  %s \033[0m \n\n"
                         '~fn-name (pr-str error#))
          {:schema ~input-schema-sym :value args# :error error#})))))

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions