GithubHelp home page GithubHelp logo

Comments (11)

lkno0705 avatar lkno0705 commented on May 27, 2024

Could someone test the library on their windows machine over the weekend? @imkgerC @moorts @nico1207 ? I won't be able to do it till monday.

Also what about the single core runtime on your machine (@marcauberer )? Do we still have the same problem with really long runtimes? If that's the case, we'll have to find a work around to benchmark the php implementation.

from matrixmultiplication.

marcauberer avatar marcauberer commented on May 27, 2024

Actually yes. I've tested on a quadcore server cpu with 2.8 GHz and got very bad results. Only for generating the random numbers on initialization, it needs about 20 seconds. For testing the program while implementing it, I used a smaller matrix size.
We should definitly find a solution for this problem.

from matrixmultiplication.

imkgerC avatar imkgerC commented on May 27, 2024

By applying the optimizations found for MatrixMultiplcation_Python I was able to get the runtime of 240x240 multiplcation down from ~13s to 0.75s singlethreaded. I was not able to install the extension needed for multithreading (pthreads, I assume?). Could you provide guidance for that or put a README in the php folder with instructions?
btw: The optimizations are implemented in the php_optimization branch and are only implemented for singlethreading right now.

from matrixmultiplication.

marcauberer avatar marcauberer commented on May 27, 2024

Great! I can't imagine where the huge time impact comes from?!
I will create a readme file and add a link to the gh repo of the pthreads library there.

from matrixmultiplication.

marcauberer avatar marcauberer commented on May 27, 2024

Merged the branch to master. I would suggest to apply this optimization to all other languages to have a compareable result.

from matrixmultiplication.

imkgerC avatar imkgerC commented on May 27, 2024

C, C++ and Rust should not experience benefits through this, as the compiler should already optimize that way. I don't have enough experience in the other languages to tell, if it is needed, but suspect that any decent optimizing compiler should handle this comparably well

from matrixmultiplication.

imkgerC avatar imkgerC commented on May 27, 2024

BTW: A 540x540 Matrix now takes 11.5s on my machine, this should be fast enough to test on the full size, as python takes 14.7s under the same conditions. @lkno0705, testing on your machine is the last step missing, I suppose.

from matrixmultiplication.

lkno0705 avatar lkno0705 commented on May 27, 2024

@imkgerC Did you manage to run a successful benchmark with multithreading?

from matrixmultiplication.

imkgerC avatar imkgerC commented on May 27, 2024

No, but I didn't try that hard. php failed to load the extension library even though I was sure to have configured it correctly

from matrixmultiplication.

lkno0705 avatar lkno0705 commented on May 27, 2024

So we‘ll stick with a singlecore benchmark then.

from matrixmultiplication.

marcauberer avatar marcauberer commented on May 27, 2024

Yes. For now I would leave it like it is and benchmark only the single core performance.

from matrixmultiplication.

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.