←back to thread

Show HN: Go Plan9 Memo

(pehringer.info)
302 points pehringer | 1 comments | | HN request time: 0.212s | source

A quick dive into the Plan9 assembly I picked up while developing my SIMD package for Go, and how it led to a 450% performance boost in calculations.
Show context
umvi ◴[] No.41880902[source]
> 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)
replies(1): >>41881079 #
1. pehringer ◴[] No.41881079[source]
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