Coder Social home page Coder Social logo

Comments (6)

paupino avatar paupino commented on June 6, 2024

This is definitely something I've been watching and something I'd like to implement. Of the two, I wanted to really see how u128 performed and how it could improve division performance. Blocks such as this can be removed which I think could come with some big improvements.

I'm going to keep this open as I do want to iterate on this feature.

from rust-decimal.

paupino avatar paupino commented on June 6, 2024

This is still on the roadmap however due to significant restructuring will be a V2 feature instead. First stage is to stabalize towards 1.0.

from rust-decimal.

paupino avatar paupino commented on June 6, 2024

I've started some experimentation of this in the evolution branch. There is much more that needs to be done here, but am open to suggestions. I'm quite curious regarding the crypto scenario and the precision that may be needed here. What sort of precision is typically expected here? (I'm unfamiliar with the implementation of this domain).

from rust-decimal.

paupino avatar paupino commented on June 6, 2024

For those that are following this issue; I'm interested if anyone has found performance improvements on their machine? In my investigations, i128 and u128 have been slower.

I also think there are perhaps three motivations here based on the comments:

  1. Increase storage capacity by using unused bytes
  2. Increase storage capacity greater than 128 bits
  3. Improve performance by utilizing native u128/i128 types

I've been focusing on number 3 with this (unsuccessfully so far on my hardware), however I suspect others may be looking for either 1 (similar to the C implementation) or perhaps number 2. I'd be interested in any input here to see what people are thinking about.

from rust-decimal.

leeson1995 avatar leeson1995 commented on June 6, 2024

@xilec I wish to refer to your i128 based implementation,thanks a lot ,Can you share a github gist link,thanks a lot ❗️

from rust-decimal.

A248 avatar A248 commented on June 6, 2024

It might be worth investigating using NonZeroU128, to take the advantage of the null-value optimization, if there are any bits known to be non-zero.

from rust-decimal.

Related Issues (20)

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.