[Gambas-user] Performance figures for various ways to do reflective method calls
Martin Fischer
martin.fischer6 at web.de
Fri Oct 13 18:47:35 CEST 2023
Hi fellow gambassians,
I was interested in the performance of reflective method calls in
gambas. I tested:
- direct (early bound) method call
- reflective via Object.Call
- reflective via gb.eval
- reflective via Variant
Here are the numbers:
Main.Main.11: Start method direct call...
Main.Main.16: Done in 540ms
Main.Main.18: Start method reflective call...
Main.Main.23: Done in 4135ms
Main.Main.30: Start method eval call...
Main.Main.37: Done in 3469ms
Main.Main.39: Start blind method variant call...
Main.Main.46: Done in 1185ms
The absolute numbers are not relevant. These figures answer the
question: "how much slower is reflective call compared to direct call".
Tiny Project is attached, if you want to reproduce.
Regards
____________________________________
Martin Fischer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ReflectiveCall-0.0.1.tar.gz
Type: application/gzip
Size: 12326 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20231013/6163c864/attachment-0001.gz>
More information about the User
mailing list