You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I put a lot of effort to make function calls as fast as possible.
This is still true: The best way to define a function from a performance perspective is to use a Function option.
In your case the map slightly outperforms Function due to a heavy ammount of optimizations. But for general, uncommon func signature results will be different. True for example: func(int, string, int, time.Time, uin16) or any other random funcs signatures.
Quoted from documentation(https://expr-lang.org/docs/functions)
This is my benchmark test:
And result
The performance of map and function methods are very close, there is no particularly obvious difference, and map method is even faster.
The text was updated successfully, but these errors were encountered: