Commit 0c2684c1 authored by Geoff Simmons's avatar Geoff Simmons

optimize equal() for the case that the blobs are the same

parent 7faebd28
Pipeline #41 skipped
......@@ -44,6 +44,8 @@ vmod_equal(VRT_CTX __attribute__((unused)), VCL_BLOB b1, VCL_BLOB b2)
{
if (b1->len != b2->len)
return 0;
if (b1->priv == b2->priv)
return 1;
return (memcmp(b1->priv, b2->priv, b1->len) == 0);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment