Sha256: 822f102d6196f18958663236115b74be33d3b25d70fa8fe3c87a1cec6bbafa1e

Contents?: true

Size: 224 Bytes

Versions: 4

Compression:

Stored size: 224 Bytes

Contents

#include "bootsnap.h"

#include <x86intrin.h>

uint32_t
crc32(const char *bytes, size_t size)
{
  size_t i;
  uint32_t hash = 0;

  for (i = 0; i < size; i++) {
    hash = _mm_crc32_u8(hash, bytes[i]);
  }
  return hash;
}

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
bootsnap-0.2.3 ext/bootsnap/crc32.c
bootsnap-0.2.2 ext/bootsnap/crc32.c
bootsnap-0.2.1 ext/bootsnap/crc32.c
bootsnap-0.2.0 ext/bootsnap/crc32.c