Skip to content

Commit

Permalink
Use an optimized crc32 library which is faster
Browse files Browse the repository at this point in the history
  • Loading branch information
eapache committed Aug 31, 2015
1 parent d851855 commit 8fa523b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crc32_field.go
Expand Up @@ -2,7 +2,8 @@ package sarama

import (
"encoding/binary"
"hash/crc32"

"github.com/klauspost/crc32"
)

// crc32Field implements the pushEncoder and pushDecoder interfaces for calculating CRC32s.
Expand Down

2 comments on commit 8fa523b

@rrh
Copy link

@rrh rrh commented on 8fa523b Jan 11, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How much faster is klauspost/crc32 over hash/crc32? the former doesn't compile under gccgo (not enough ifdefs[sic] to guard against compilation of assembly code), but the later does.

@eapache
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per the original PR (#527) 15-20%.

Please sign in to comment.