You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
change implementation of kvbatch copying []byte into C
previous implementation used C.memmove to do heavy lifting
doing this involves passing a pointer into the []byte to C
in Go 1.6 this has an unintended performance penalty as it
unnecessarily checks the entire slice
this is a bug in Go 1.6 documented here:
golang/go#14387
however, it seems as though this call can be avoided entirely,
by creating an artificial slice header which points to the
newly malloc'd C buffer, we use Go's builtin copy() method
in addition to avoid this bug, it also avoids a cgo call
which we know can add up
Change-Id: I910e5705e29e6c86343fd0e6315c8430f56b07ef
Reviewed-on: http://review.couchbase.org/60991
Reviewed-by: Steve Yen <[email protected]>
Tested-by: Marty Schoch <[email protected]>
0 commit comments