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
The function is wrapped in hxcpp's Dynamic which I believe quite costly performance-wise because of all the wrapping and even array allocation for arguments, so this is something we might care about.
The cause is probably that the cpp.Function ends up being typed as a simple function in the end, as we can see in the AST. I'm not sure why though.
Hmm, right after submitting this issue, I've found the // Legacy Api comment on the cpp.Function.call property. And indeed if we remove the .call from the original example and call _f directly, we'll get much better output:
@nadako We may be able to use conditional compilation on this part of the code. At what version can we call the function directly, without the .call method? Does it require 3.4.0, does it work on 3.2.1...?
One of the intermediate issues that lead to the discovery of HaxeFoundation/hxcpp#575 is the following:
Source:
Generated C++
The function is wrapped in hxcpp's
Dynamic
which I believe quite costly performance-wise because of all the wrapping and even array allocation for arguments, so this is something we might care about.The cause is probably that the
cpp.Function
ends up being typed as a simple function in the end, as we can see in the AST. I'm not sure why though.AST:
The text was updated successfully, but these errors were encountered: