float matrix multiplication benchmark

Previous topic - Next topic

Qedo

I ask two things to those more experienced than me.
1) between GLB and C, in the float matrix multiplication benchmark, why there is a relationship in the rate of 5/1?   1400ms GLBasic and 300ms INLINE C. I think too high
2) Why the local arrays slow the program by 60%? LOCAL=2300ms against GLOBAL=1400ms.
To see this uncomment:
// LOCAL  a[]
// LOCAL  b[]
// LOCAL  c[]
Ciao

[attachment deleted by admin]

Kitty Hello

having a,b,c as locals would require a reallocation for each function call. That's slow.
With INLINE C++ you get the direct access to the array elements and the compiler is smart enough to optimize here, so it drops some multiplications or does them in the compile stage.

The GLBasic arrays are function calls on run time and also have a bounds check, even in release mode. That might be slower, but you surely don't want to overwrite memory and have totally strange results instead of a proper error message.