Home

Awesome

intrinsic

Build Status Go Report Card

Provide Golang native SIMD intrinsics on x86/amd64 platform

Usage


package main

import (
    "fmt"

    "github.com/mengzhuo/intrinsic/sse2"
)

func main() {
    src := []float32{3.14, 2.17}
    dst := []float32{2.17, 3.15}
    sse2.MAXSDm64float32(src, dst)
    fmt.Print(src, dst) //[2.17 3.15] [2.17 3.15]
}

Benchmarks

SSE2 it will provide about 6x-7x performance enhancement.

BenchmarkPMINUBByte-4         	1000000000	         2.65 ns/op	       0 B/op	       0 allocs/op
BenchmarkGeneralPMINUBByte-4   	100000000	        15.8 ns/op	       0 B/op	       0 allocs/op
BenchmarkPAND-4               	1000000000	         2.61 ns/op	       0 B/op	       0 allocs/op
BenchmarkGeneralAND-4         	100000000	        15.4 ns/op	       0 B/op	       0 allocs/op

Development

All codes in subdir is generated by scanner.go , see Makefile for more detail.

x86.csv and x86desc.csv are from another repos in https://github.com/mengzhuo/x86data

TODO