now the reference implementation in pal doesn't do any kind of sorting, guess it is assumed the numbers are already sorted? do we need an additional function for actually doing sorting and summing up in a single step? there isn't much speed-gain possible in summation. (well, on assembler level it might be a good idea to sum up pairs so that next step doesn't depend on the previous, but on epiphany or recent x86 this doesn't matter.) but if you add a naive sorting algorithm it might make a difference. (using the existing sorting, keep in mind that you need the absolute value first.)

btw, a function for partial sum also seems to be missing. on simd it's easy to implement in log time. sum then is a by-product of that algorithm, although it then is lacking the precision from enforcing sorted sum...

to summarize: please add sort_sum and part_sum and maybe sort_part_sum to the function list in the math directory. also a lg function for log2 might be useful for turning products into sums. if not, I'll do it after this month ends...

Statistics: Posted by piotr5 — Wed Jun 24, 2015 6:32 am

]]>