Live data from Hacker News

Show HN: Accelerate SHA256 Computations in Go Using AVX512 instructions

github.com

1–10 of 36 posts

Re: Show HN: Accelerate SHA256 Computations in Go Using AVX512 instructions

#5

Possibly I'm confused, but in what sense is this "in Pure Go"?

IMO, it's playing fast and loose with that term, but I guess the point is that it's not using CGO (i.e. calling into C code). It is, however, using the assembler packaged with the Go tools, so in that regard it's not "pure" go.

Re: Show HN: Accelerate SHA256 Computations in Go Using AVX512 instructions

#6

Possibly I'm confused, but in what sense is this "in Pure Go"?

I guess in the sense that you only need the Go toolchain, rather than also needing a C toolchain to compile+link an extra C object file into your binary.

Re: Show HN: Accelerate SHA256 Computations in Go Using AVX512 instructions

#7
One thing to note is that the benchmark is running on a Skylake Platinum chip which has two AVX512 FMAs.

You need a Gold 6000 series and above to see any benefit from AVX512. In most other cases the CPU throttles down some insane amount and there’s no to little benefit.

Re: Show HN: Accelerate SHA256 Computations in Go Using AVX512 instructions

#8
This is assembly, not pure Go, but it doesn't use CGO which I probably what they mean.

Intel Cannon Lake processors will support the SHA instruction extensions (currently available only on Goldmont). It will be interesting to see how that compares with this approach of running 16 SHA computations in parallel. You would be able to get rid of the scheduling overhead of having to first queue up 16 SHA calculations from other threads.

Re: Show HN: Accelerate SHA256 Computations in Go Using AVX512 instructions

#9
post #8

This is assembly, not pure Go, but it doesn't use CGO which I probably what they mean. Intel Cannon Lake processors will support the SHA instruction extensions (currently available only on Goldmont). It will be interesting to see how that compares with this approach of running 16 SHA computations in parallel. You would be able to get rid of the scheduling overhead of having to first queue up 16 SHA calculations from…

This is assembly, not pure Go

Well, if you're going to dip into pedantic mode, couldn't the language maintainers just define Go to include a few relevant Assembly instruction sets? (Not taking a dig at you but rather at the above level of pendantry.)

Re: Show HN: Accelerate SHA256 Computations in Go Using AVX512 instructions

#10
post #5

Possibly I'm confused, but in what sense is this "in Pure Go"?

IMO, it's playing fast and loose with that term, but I guess the point is that it's not using CGO (i.e. calling into C code). It is, however, using the assembler packaged with the Go tools, so in that regard it's not "pure" go.

IMO, it's playing fast and loose with that term

The terminology in this context is already fast and loose: It is rigorous in a practical engineering sense and is far from a mathematical level of precision. As I pointed out above, the maintainers could just define Go to include a few Assembly languages.

Post reply on HN