-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
stdLambda
#performance
#51
Comments
It's difficult to say for sure, it could be due to a number of reasons. Happy for help looking into exactly why. The relevant parts of the code are as follows: Some whatchouts:
If TypeName(Me.oFunctExt) = "Dictionary" Then
If Me.oFunctExt.exists(sFuncName) Then
Dim vInjectedVar As Variant
Call CopyVariant(vInjectedVar, oFunctExt(sFuncName))
If TypeOf vInjectedVar Is stdICallable Then
Call CopyVariant(evaluateFunc, Me.oFunctExt(sFuncName).RunEx(args))
Else
Call CopyVariant(evaluateFunc, vInjectedVar)
End If
Exit Function
End If
End If so that's where i'd check first In general though it's likely because at min-3 stack pops are required (Func symbol, argLength, arg + timeWhileEvaluating); where with standard numerical evaluation only 1 stack pop is required (arg). |
I've included this on the stdLambda performance megathread here: Please use this issue in future. |
I have been playing with
stdLambda
and a doubt is gnawing my head. Why is the evaluation of a function likesin(x)
so slow compared to numeric evaluation in this class module, given the fact it is a single operation?The text was updated successfully, but these errors were encountered: