Open konsumer opened 2 years ago
For more details on how the experimental benchmarks I wrote were implemented - reference https://github.com/RobLoach/node-raylib/issues/100#issuecomment-1046400083
Some documentation on what flattening arguments looks like in C++ and JS can be found in the raylib4 branch, in the generator docs: https://github.com/RobLoach/node-raylib/blob/raylib4/docs/generator/flattening_arguments.md
Wow!
@twuky found that flattening structs on in/out gains some major performance. Here are the metrics on my system (linux, RTX 3050):
current
proposed
On twuky's tests I get insanely good FPS:
It's not a totally fair comparison, in the sense that branch has other optimizations (which we should also add to the generator) but the flat thing by itself will help, and refs will also help. We should try to do both in the generated code.