dolthub / swiss

Golang port of Abseil's SwissTable
Apache License 2.0
773 stars 39 forks source link

Getting Error in Usage of swisstable #6

Closed ghost closed 1 year ago

ghost commented 1 year ago

I'm getting the following error:

../../go/pkg/mod/github.com/thepudds/swisstable@v0.0.0-20221011152303-9c77dc657777/match_stub.go:5:6: missing function body

Whenever I try to run the tests.

I took a peek at the package "thepudds/swisstable" and I noticed this file:

match_amd64.s

which looks like it should be providing the stub for AMD64 - but doesn't seem to be. I am running on a Mac with AMD64.

In regards to what I've tried - before I tried running the tests - I ran the following:

go mod tidy

which did install the following:

go: downloading github.com/thepudds/fzgen v0.4.2
go: downloading gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405
go: downloading github.com/sanity-io/litter v1.5.1

Then when I tried to run the tests and I got the same error - I also ran the following:

go install

I did check out the README.md here: https://github.com/thepudds/swisstable

But, didn't see anything with regards to special instructions for AMD64.

Thanks!

andy-wm-arthur commented 1 year ago

Hey @source-transformer! Thanks for submitting this issue.

SwissMap, like SwissTable, is designed around the SSE instruction set, which is x86-specific. The dependency you mentioned above, thepudds/swisstable, is another Swiss Table implementation in Go. I included it in the tests as a benchmarking comaprison, but it seems to only support x86/amd64 platforms. If your machine is amd64, you shouldn't have an issue, but if you're using a newer mac, you may be running on Arm64 and thepudds/swisstable will break. Do you mind running this to confirm?

go env GOARCH

For non-x86 platforms, this repo has a fallback implementation without SIMD instructions. Given that the thepudds implementation does not, I should probably remove it as a dependency.

ghost commented 1 year ago

right you are - I'll give the fallback implementation a try when I next take a look at this.

Thanks!