Optimize memory copy

This commit is contained in:
siddontang 2014-07-07 15:36:45 +08:00
parent 1b1d2b74e1
commit 0fd6c150e8
2 changed files with 3 additions and 3 deletions

View File

@ -273,7 +273,7 @@ func (db *DB) HDel(key []byte, args ...[]byte) (int64, error) {
ek = db.hEncodeHashKey(key, args[i])
v = it.Find(ek)
v = it.RawFind(ek)
if v == nil {
continue
} else {

View File

@ -477,7 +477,7 @@ func (db *DB) zrank(key []byte, member []byte, reverse bool) (int64, error) {
for ; it.Valid(); it.Next() {
n++
lastKey = it.Key()
lastKey = it.BufKey(lastKey)
}
it.Close()
@ -511,7 +511,7 @@ func (db *DB) zRemRange(t *tx, key []byte, min int64, max int64, offset int, cou
it := db.zIterator(key, min, max, offset, count, false)
var num int64 = 0
for ; it.Valid(); it.Next() {
sk := it.Key()
sk := it.RawKey()
_, m, _, err := db.zDecodeScoreKey(sk)
if err != nil {
continue