Giter Club home page Giter Club logo

Comments (10)

rpep avatar rpep commented on June 29, 2024 1

I do wonder whether it's worth doing anyway though. It'd be interesting to see whether the RNG generation is even a performance problem in the code - I'd doubt it except maybe in the Monte Carlo case.

Plus there's the advantage of it being better tested than anything we write...

from fidimag.

owlas avatar owlas commented on June 29, 2024

Did this get fixed?

from fidimag.

rpep avatar rpep commented on June 29, 2024

@ww1g11 You merged in some stuff a while ago, did you fix this?

from fidimag.

ww1g11 avatar ww1g11 commented on June 29, 2024

We have done a simple comparsion between our own code and GNU RNG, it shows that our own code is faster than the GNU RNG (~5 times fast), considering the extra complexity to introduce a new library, now we still make use of our own codes.
PS: We haven't try boost since it's quite heavy.

from fidimag.

ww1g11 avatar ww1g11 commented on June 29, 2024

MT RNG can be implemented within a few lines of code, but the presence of a new library may introduce an extra difficulty in installing fidimag, for example, compiling fidimag in windows system. We need to find a balance between 'reinventing the wheel' and using others' wheel, that's why we haven't wrote our own codes for ode solver and FFT, but implemented a MT RNG.

from fidimag.

owlas avatar owlas commented on June 29, 2024

Sorry Weiwei, I wasn't suggesting that yours was not up to scratch. I'm impressed with how easily you threw it together!

I just think that because the algorithm is not that intuitive (at least to me) it is quite hard to read the source. And agree that it isn't rigorously tested.

On the other hand I agree with the dangers of having more dependencies. But there are industry standard and very stable options.

from fidimag.

ww1g11 avatar ww1g11 commented on June 29, 2024

yes, I agree that our implementation is not well tested and the library should be considered as the first option. A good news is that microsoft is embracing linux/open sources, so the barrier of installing is disappearing, maybe we should try to swith it on in the future (Ryan has wrapped the library using cython already).

from fidimag.

rpep avatar rpep commented on June 29, 2024

We could just use Numpy? That's a dependency already

from fidimag.

owlas avatar owlas commented on June 29, 2024

But this is called in the C code right? The fastest method would be to make a pure C call.

from fidimag.

owlas avatar owlas commented on June 29, 2024

I think.

from fidimag.

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.