Skip to content

Instantly share code, notes, and snippets.

@zhenjl
Last active December 23, 2015 04:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zhenjl/6577789 to your computer and use it in GitHub Desktop.
Save zhenjl/6577789 to your computer and use it in GitHub Desktop.
# h = operations
# i = # of bits for bitmap 1
# j = # of bits for bitmap 2
# k = random distance between bits for bitmap 1 (0-k) - indicates sparsity
# l = random distance between bits for bitmap 1 (0-l) - indicates sparsity
for h in and or xor andnot
do
for i in 100 10000 1000000
do
for j in 100 10000 1000000
do
for k in 3 30 300 3000 30000
do
for l in 3 30 300 3000 30000
do
cat <<EOF >> benchmark_autogen_test.go
func Benchmark_${h}_${i}_${j}_${k}_${l}(b *testing.B) {
benchmarkDifferentCombinations(b, "$h", $i, $j, $k, $l)
}
EOF
cat <<EOF >> benchmark_autogen_2_test.go
func Benchmark_${h}_${i}_${j}_${k}_${l}(b *testing.B) {
benchmarkDifferentCombinations2(b, "$h", $i, $j, $k, $l)
}
EOF
done
done
done
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment