Skip to content

Commit

Permalink
vgo
Browse files Browse the repository at this point in the history
  • Loading branch information
OneOfOne committed May 30, 2018
1 parent 84bd68e commit 6def279
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This is a native Go implementation of the excellent [xxhash](https://github.com/

## Install

go get github.com/OneOfOne/xxhash
go get github.com/OneOfOne/xxhash

## Features

Expand All @@ -17,6 +17,7 @@ This is a native Go implementation of the excellent [xxhash](https://github.com/
* To manually toggle the appengine version build with `-tags safe`.

## Benchmark

### Core i7-4790 @ 3.60GHz, Linux 4.12.6-1-ARCH (64bit), Go tip (+ff90f4af66 2017-08-19)

```bash
Expand Down Expand Up @@ -51,18 +52,23 @@ Fnv64Short-8 74.7ns ± 8%
```

## Usage

```go
h := xxhash.New64()
// r, err := os.Open("......")
// defer f.Close()
r := strings.NewReader(F)
io.Copy(h, r)
fmt.Println("xxhash.Backend:", xxhash.Backend)
fmt.Println("File checksum:", h.Sum64())
```

[<kbd>playground</kbd>](http://play.golang.org/p/rhRN3RdQyd)

## TODO

* Rewrite the 32bit version to be more optimized.
* General cleanup as the Go inliner gets smarter.

## License

Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module github.com/OneOfOne/xxhash

0 comments on commit 6def279

Please sign in to comment.