Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

  1. Which is the recommended way to deal with custom functions.
    a) passing with env map to Run
    b) creating in Compile with expr.Function

  2. Is there a performance difference?

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

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.

You must be logged in to vote
2 replies
Comment options

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

In which situation you prefer use which one? Maybe some example of some situation where one is more suitable than the others?
Is there functional difference?

Comment options

It depends on your data structures. For example, Order{} structure.

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

AltStyle によって変換されたページ (->オリジナル) /