Comments (11)
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.
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.
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.
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.
Merged the branch to master. I would suggest to apply this optimization to all other languages to have a compareable result.
from matrixmultiplication.
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.
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.
@imkgerC Did you manage to run a successful benchmark with multithreading?
from matrixmultiplication.
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.
So we‘ll stick with a singlecore benchmark then.
from matrixmultiplication.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from matrixmultiplication.