aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony Wang2022-03-30 08:50:59 -0500
committerAnthony Wang2022-03-30 08:50:59 -0500
commit1bca3da2e776edb396852201c5f75ed7aa49e309 (patch)
treeea40bf718bef6b181ef12607be960c5d172729f6
parent71dbd4904da68565942d8ea4b193f46df2c37a2e (diff)
Adjust weight function
-rw-r--r--examples/gen.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/examples/gen.go b/examples/gen.go
index 8a0f983..f7e9da9 100644
--- a/examples/gen.go
+++ b/examples/gen.go
@@ -5,7 +5,6 @@ import (
"database/sql"
"flag"
"fmt"
- "math/bits"
"os"
"strings"
@@ -56,7 +55,7 @@ func main() {
fmt.Println(val)
}
- _, err = db.Exec("INSERT INTO cards VALUES(?, ?, ?, ?)", i, 1<<(bits.LeadingZeros(uint(i))-40), key, val)
+ _, err = db.Exec("INSERT INTO cards VALUES(?, ?, ?, ?)", i, 1<<(30-i/50), key, val)
i++
}
}