You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 19, 2020. It is now read-only.
A number of linear algebra operations in the library would benefit from being pinned and working directly with pointers. Creating this issue so it can be referenced in git commits. I will pick this up and send a PR once complete.
Vector-Matrix
This shows a comparison of Accord's vector.Dot(matrix, result) versus a proposed change pinning the arrays and using pointer arithmetic.
Size is the size of the matrix (so 32 means a 32 x 32 square matrix). Trials is the number of simulations run. The timings are shown next and then the speed multiplier is shown. So the bottom row shows it is 17 times faster to pin the array than Accord's current method.
Size
Trials
Accord (ms)
Proposed (ms)
Multiplier
8
4194304
750
368
x2
16
1048576
722
291
x2.5
32
262144
684
242
x2.8
64
65536
746
242
x3.1
128
16384
782
238
x3.3
256
4096
1049
227
x4.6
512
1024
1095
225
x4.9
1024
256
2936
256
x11.5
2048
64
3781
254
x14.9
4096
16
4373
255
x17.1
Matrix-Vector
This shows a comparison of Accord's matrix.Dot(vector, result) versus a proposed change pinning the arrays and using pointer arithmetic.