im3w1l
searching PlanetScale…
- 1.▲
- 2.▲
- 3.▲
- 4.▲
- 5.▲
- 6.▲
36 ms·
- 781.▲
I think relaxing the ordering requirement let's you use simd something like this (semi-pseudo code) (a, b, c, d) = (0, 0, 0, 0);
for(int i = 0; i < n; i += 4) {
(a, b, c, d) += (arr[i], arr[i+1], arr[i+2], arr[i+3]);
} - 782.▲
- 783.▲
- 784.▲
- 785.▲
- 786.▲
- 787.▲
- 788.▲
- 789.▲
- 790.▲
- 791.▲
- 792.▲
- 793.▲
- 794.▲
- 795.▲
- 796.▲
- 797.▲
- 798.▲
- 799.▲
- 800.▲
- 801.▲
- 802.▲
- 803.▲
- 804.▲
- 805.▲
- 806.▲
- 807.▲
- 808.▲
- 809.▲
- 810.▲
More ›