Description
FfiCall.Handlex01(RunTime): 347.8671304347826 us.
FfiCall.Handlex02(RunTime): 384.86376755820663 us.
FfiCall.Handlex04(RunTime): 492.896007885658 us.
FfiCall.Handlex10(RunTime): 846.1214043993232 us.
FfiCall.Handlex20(RunTime): 1193.412291169451 us.
We currently call into C for every handle with
sdk/runtime/vm/compiler/frontend/kernel_to_il.cc
Lines 2750 to 2764 in 755686e
sdk/runtime/vm/runtime_entry.cc
Lines 3559 to 3570 in 755686e
Instead, we can extend the EnterHandleScope with an int how many handles we want, and do some integer arithmetic in IL to compute the addresses of those handles. (Up to the number of handles that fit into one single block.)
sdk/runtime/vm/compiler/frontend/kernel_to_il.cc
Lines 2731 to 2736 in 755686e