Coder Social home page Coder Social logo

Comments (4)

andrew-m-h avatar andrew-m-h commented on May 29, 2024

After a cursory test using the Fermat Little Theorem test as an example, it appears that BigInt is a complete Joke in terms of performance when compared with gmp-d. It is also lacking some fundamental functions commonly used, such as pow_mod and root_rem. I implemented pow_mod in D for BigInt to give it a fighting chance, and it was too slow to actually complete the test on my computer.
I think this is a great advertisment for a gmp binding for D.

from gmp-d.

nordlow avatar nordlow commented on May 29, 2024

Any implementation that uses expression templates (ET) is gonna be faster (at run-time) than all the wrapper implementations that doesn't (including rust-gmp). Further, gmp-d operates, when possible, directly on the underlying __mpz__struct without the overhead of a __gmpz-function call. Compiled with LDC, gmp-d should beat everything except low-level C algorithms directly using the GMP C API. Remains to be proven though. Benchmarking examples are very welcome as I have little experience with which calculations that are most common and time-consuming in multi-precision-software.

from gmp-d.

nordlow avatar nordlow commented on May 29, 2024

I've added some optimization to the operator overloads now.

from gmp-d.

nordlow avatar nordlow commented on May 29, 2024

I'm closing this for now.

from gmp-d.

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.