Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Basically, I wanted a set of functions that would allow me to perform simd operations on slices.

How is this actually used though? I searched the whole article, and no where are any operations being performed on slices.

Edit: I found what I was looking for in the linked docs: https://pkg.go.dev/github.com/pehringer/simd#pkg-index

So basically if you have 2 slices you want to add together, instead of a for loop you could do it in parallel with simd using:

    simd.AddInt32(slice1, slice2, result)


I should have added some examples in the docs / repo :( checkout the benchmark code at the bottom of this file for an example: https://github.com/pehringer/simd/blob/main/simd_test.go




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: