GithubHelp home page GithubHelp logo

Comments (6)

klauspost avatar klauspost commented on August 29, 2024

I am not sure what you mean. I have adjusted the documentation, since it is carryless multiplication your CPU must support, not only SSE 4.2.

from crc32.

wscott avatar wscott commented on August 29, 2024

For example I added some tests like this:

func BenchmarkCCrc1KB(b *testing.B) {
    benchmark(b, New(MakeTable(Castagnoli)), 1024)
}

func BenchmarkCStdCrc1KB(b *testing.B) {
    benchmark(b, crc32.New(crc32.MakeTable(Castagnoli)), 1024)
}

And found that for Castagnoli the std library was the same speed. And looking I see it already included that support. https://golang.org/src/hash/crc32/crc32_amd64.s

I assumed that you wrote all of the assembly files and the std library just copied part of them. Now I am guessing they always had the fast Castagnoli version and you extended it to include the SSE code for the IEEE crc as well.

from crc32.

klauspost avatar klauspost commented on August 29, 2024

Yes, I started this as a copy of the standard library.

This is the current "tip" version, which includes my code: https://tip.golang.org/src/hash/crc32/crc32_amd64.s

from crc32.

wscott avatar wscott commented on August 29, 2024

BTW another optimization that I notice isn't included is that the slicingBy8 optimization can still be used in the Castagnoli case.

from crc32.

klauspost avatar klauspost commented on August 29, 2024

Oh yes, that might be nice for other platforms.

from crc32.

klauspost avatar klauspost commented on August 29, 2024

Added in PR #5

from crc32.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.