Updated readme.
This commit is contained in:
parent
433509f1af
commit
9befef8908
20
README.md
20
README.md
@ -1,15 +1,23 @@
|
||||
# flake
|
||||
Very simple snowflake generator
|
||||
|
||||
but..
|
||||
Finally, hit my goal of 244ns/op.
|
||||
|
||||
But, interesting comparison of different methods.
|
||||
|
||||
Why is the mutex'd version faster?
|
||||
|
||||
```
|
||||
go test -bench=.
|
||||
time go test -bench=.
|
||||
testing: warning: no tests to run
|
||||
PASS
|
||||
BenchmarkGenerate-12 3000000 523 ns/op 0 B/op 0 allocs/op
|
||||
BenchmarkGenerateLocks-12 5000000 290 ns/op 0 B/op 0 allocs/op
|
||||
BenchmarkGenerateLocksParallel-12 3000000 540 ns/op 0 B/op 0 allocs/op
|
||||
BenchmarkGenerateChan-12 3000000 503 ns/op 0 B/op 0 allocs/op
|
||||
BenchmarkGenerateChanParallel-12 2000000 743 ns/op 0 B/op 0 allocs/op
|
||||
BenchmarkGenerateNoSleep-12 5000000 244 ns/op 0 B/op 0 allocs/op
|
||||
BenchmarkGenerateNoSleepLock-12 5000000 283 ns/op 0 B/op 0 allocs/op
|
||||
BenchmarkGenerateNoSleepLockParallel-12 5000000 348 ns/op 0 B/op 0 allocs/op
|
||||
BenchmarkGenerate-12 5000000 283 ns/op 0 B/op 0 allocs/op
|
||||
BenchmarkGenerateLocks-12 5000000 293 ns/op 0 B/op 0 allocs/op
|
||||
BenchmarkGenerateLocksParallel-12 5000000 368 ns/op 0 B/op 0 allocs/op
|
||||
ok _/home/bruce/flake 15.291s
|
||||
go test -bench=. 16.88s user 7.37s system 151% cpu 15.981 total
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user