On Wed, May 25, 2022 at 6:03 AM Patric Lemo <jiangzhan1...@gmail.com> wrote:
>
>
> Problems I met when using fast API calls.
>
> Hit rate:
>
> Whether Fast API can take effect seems to be related to JIT. The JIT was not 
> triggered in a simple test example for the first 8000 ~ 11000 times.
> In a complex project, some high-frequency functions should meet the trigger 
> conditions but fail to trigger in the 20-minute test process.
>
>
> Property functions are not triggered
>
>
> Tested the getter setter method of x / y of `Vector2`, but failed to trigger 
> the corresponding CFunction in a big loop.

Check with --trace_opt or --trace_opt_verbose if the method is getting
optimized (and if not, why not.) Fast API calls only work from
optimized code.

If you need help figuring out the problem, please post your code.

> Questions:
>
>  How to improve the hit rate?
>  Is it possible to trigger CFunction directly?
> Fucntioncallback and CFunction need to be provided at the same time. Can I 
> omit the FunctionCallback?
> Will property callback supportFast API?
>
>
> other:
>
> Provide a mechanism to store the function address in a JS variable, 
> jump(instruction) directly to the function, and ignore the sandbox mechanism?

JS and C++ have different calling conventions and value
representations so no, that can't work. There needs to be a
translation layer somewhere.

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/v8-users/CAHQurc_rpcvbAP4tn5kJv8TeyLuRQZNx%2BJPerwAzCGcTBMMt2g%40mail.gmail.com.

Reply via email to