Ivorforce / NumDot

Tensor math and scientific computation for the Godot game engine.
https://numdot.readthedocs.io
MIT License
19 stars 7 forks source link

Benchmarks in the Godot demo project (Godot vs NumDot) #39

Open Ivorforce opened 2 months ago

Ivorforce commented 2 months ago

These benchmarks should compare performance you would normally get with godot vs performance you can get with NumDot.

Ideally, they

Not all of this is needed for the initial benchmarks. Even just a few proper benchmarks would be helpful.

Godot has a benchmark repo we can pick math-y benchmarks from, to compare to: https://github.com/godotengine/godot-benchmarks/tree/main/benchmarks

Ivorforce commented 1 month ago

I implemented two benchmarks:

The second benchmark is bottlenecked mostly by needing to convert to Packed*. That would be improved a lot by implementing #42 and #62. Good goals to be set!

Edit: The bottleneck has been resolved, it's now roundabout on par!

Ivorforce commented 1 month ago

We should add a benchmark generator for all common functions (in addition to hand-written ones). Most current benchmarks are very tiresome to implement, and end up just creating an array and calling a function in a loop. We can automate that, and add benchmarks automatically for every function! This would also be nice in case someone wants to quickly check other combinations of functions.