]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common/Checksummer: Eliminates data copying in crc32c calculation
authorIgor Fedotov <ifedotov@mirantis.com>
Thu, 2 Jun 2016 09:19:23 +0000 (12:19 +0300)
committerIgor Fedotov <ifedotov@mirantis.com>
Thu, 2 Jun 2016 09:19:23 +0000 (12:19 +0300)
Signed-off-by: Igor Fedotov <ifedotov@mirantis.com>
src/common/Checksummer.h

index 2e062e075d4b5194fe54f0e3655d201d7168791c..28406540b37463d44c27512ec18600e30c46af0b 100644 (file)
@@ -24,9 +24,7 @@ public:
       size_t len,
       bufferlist::const_iterator& p
       ) {
-      bufferlist t;
-      p.copy(len, t);
-      return t.crc32c(-1);
+      return p.crc32c(len, -1);
     }
   };