Skip to content

Custom Functions: passing with env map to Run or creating in Compile with expr.Function #542

Answered by antonmedv
aldas asked this question in Q&A
Discussion options

You must be logged in to vote

Which is the recommended way to deal with custom functions.

Expr has three ways to define function: via map, via methods on env struct, via expr.Function.

Is there a performance difference?

The fastest way is via expr.Function.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@aldas
Comment options

@antonmedv
Comment options

Answer selected by aldas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants