Skip to content

s/fn validation has extra overhead #450

@frenchy64

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#})))))

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