mirror of
https://github.com/golang/go
synced 2024-11-18 22:44:48 -07:00
Small addition to previous optimization of memequal as discussed here: http://groups.google.com/group/golang-nuts/browse_thread/thread/f591ba36d83723c0/9aba02d344045f38
R=golang-dev, r, r2 CC=golang-dev https://golang.org/cl/2880041
This commit is contained in:
parent
3a50d721a8
commit
23c41a1ef2
@ -320,6 +320,8 @@ memequal(uint32 s, void *a, void *b)
|
|||||||
{
|
{
|
||||||
byte *ba, *bb, *aend;
|
byte *ba, *bb, *aend;
|
||||||
|
|
||||||
|
if(a == b)
|
||||||
|
return 1;
|
||||||
ba = a;
|
ba = a;
|
||||||
bb = b;
|
bb = b;
|
||||||
aend = ba+s;
|
aend = ba+s;
|
||||||
|
Loading…
Reference in New Issue
Block a user