GithubHelp home page GithubHelp logo

lkno0705 / matrixmultiplication Goto Github PK

View Code? Open in Web Editor NEW
16.0 2.0 6.0 150.84 MB

Just a little playground, to test and try the benefits of Running Calculations on CPU or GPU with multiple threads.

Java 5.65% C++ 16.97% Cuda 4.62% Python 9.18% Kotlin 3.60% Rust 4.15% C# 4.84% C 4.42% Go 2.22% PHP 5.27% Batchfile 0.29% Assembly 14.41% Julia 1.46% PowerShell 0.17% JavaScript 2.00% F# 3.18% Crystal 1.33% CMake 0.92% XSLT 2.94% ABAP 12.37%
gpu-computing matrix-multiplication threads multiple-threads gpu playground java cpp csharp cuda

matrixmultiplication's Introduction

MatrixMultiplication

Just a little playground, to test and try the benefits of Running Calculations on CPU or GPU with multiple threads.

System stats for the compared run:

Default matrix size: 1440x1440
Thread count: 24
CPU: Ryzen 9 3900X
GPU: Nvidia RTX 2070Super

Java:

Type int

Single: 7.769s
Threaded: 1.124s

Type float

Single: 6.837s
Threaded: 1.225s

C++

Single: 2.21483s
Threaded: 0.460356s

SIMD

Single: 0.5412s
Threaded: 0.1225s

CUDA

Single: -
Threaded: 21.499 ms

Python

Single: 230.283s
Threaded: 17.304s

Kotlin

Single: 6.5s
Threaded: 1.15s

Rust

Single: 2.103s
Threaded: 0.496s

C#

Single: 3.16s
Threaded: 0.515s

C

Single: 2.177s
Threaded: 0.456s

GO

Single: 2.556s
Threaded: 0.4934s

x64 NASM

Single: 0.621s
Threaded: 0.100s

PHP

Single: 160.47s
Threaded: -

Julia

Single: 3.171s
Threaded: 0.576

Excel VBA (Matrix size: 340x340)

Single: 936s
Threaded: - (Not supported)

XSLT (Matrix size: 340x340)

Firefox: 1 801s
Chrome: 4 101s

F#

Single: 2.923s
Threaded: 0.518s

JS

Single: 14.25618s
Threaded: -

OpenCL

Single: To be tested
Threaded: To be tested

SQLite (Matrix size: 340x340)

Single: 41.61s
Threaded: -

TCL

Single: -
Threaded: 170,69s

Lua

Single: To be tested
Threaded: To be tested

Zig

Single: To be tested
Threaded: To be tested

matrixmultiplication's People

Contributors

andretrump avatar danbreu avatar data-niklas avatar davidzefferer avatar excel-lent avatar fabianvdw avatar imkgerc avatar lkno0705 avatar marcauberer avatar moorts avatar nico1207 avatar sunfl0w avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

matrixmultiplication's Issues

Goals for the benchmarking tool

What exactly are the functions the benchmarking tool should fulfill? Should it be system independant, or is it fine if it only runs on @lkno0705's system? (Since absolute paths are used in the current version).
Also @lkno0705 what is the goal for the markdown-creation script? Do you plan on extending it so it creates the whole README and calculates the execution times?

New test runs

Just to track. Whenever you have time @lkno0705
Needed are:

  • x64 NASM re-run

  • PHP re-run

  • SIMD C++

  • Julia

Order languages in README by speed

I would suggest to reorder the programming languages in the readme file. I can imagine, that this would be more intuitive.
And btw: Please rerun the Kotlin benchmark. I just committed a bugfix.

SIMD Folders

I'm currently a bit confused about the Folderstructure of the SIMD implementations. We got 2 Folders regarding SIMD, both with cpp-files in it. Is there a specific reason for this? What is the difference between these 2 implementations?

PHP multithreading implementation

Threads in PHP are pretty messy: Threads are not officially supported by PHP. There is a library, which implements threads in C but this library is archived and gets no longer maintained. Since I'm testing on a Linux machine and I only found an executable version of the library for Windows, I was not able to test the script, but it should theoretically work. Maybe you can get the library work on your Windows system.

Julia implementation error

After I ran the .bat file and started the .jl file I got some error printed to cmd. I attached a scrennshot of cmd. I also tried it after running the powershell script.
Julia_Error

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.