From 63ab6161db33b135be88863ebb68a4d18cef140e Mon Sep 17 00:00:00 2001 From: Bruce Marriner Date: Wed, 25 May 2016 15:07:49 -0500 Subject: [PATCH] The big question. --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 796bf0c..8dc7726 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,15 @@ # flake Very simple snowflake generator +but.. + +Why is the mutex'd version faster? + +``` +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 +```