Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/catatsuy/ruby_matrix_bench
https://github.com/catatsuy/ruby_matrix_bench
Last synced: 10 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/catatsuy/ruby_matrix_bench
- Owner: catatsuy
- License: mit
- Created: 2013-12-07T09:17:15.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2013-12-09T01:45:45.000Z (almost 11 years ago)
- Last Synced: 2024-05-01T20:23:25.789Z (6 months ago)
- Language: Ruby
- Size: 10.3 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Introduction
I compare the execution time of the `NMatrix` and `matrix` which is the ruby standard library.
I will do the multiplication and the inverse of a 28-by-28 (square) matrix.
Input values is prepared in advance.
The Number of input values is 42837.# Notes
This file use `NMatrix`.
[Installation · SciRuby/nmatrix Wiki](https://github.com/SciRuby/nmatrix/wiki/Installation)
In advance, you will install the dependent packages.
You might have to pass the environment variables depending on your environment.# Result
% bundle exec ruby bench.rb
user system total real
6.460000 0.070000 6.530000 ( 6.982642)
666.870000 1.180000 668.050000 (694.251381)% bundle exec ruby bench.rb
user system total real
6.540000 0.090000 6.630000 ( 6.942445)
683.680000 6.830000 690.510000 (786.069864)% bundle exec ruby bench.rb
user system total real
7.070000 0.060000 7.130000 ( 7.923331)
667.280000 1.500000 668.780000 (700.111114)# The Simulation Environment
|||
| ------------- |:-------------:|
| OS | Debian7(wheezy) |
| CPU | AMD Athlon Dual Core Processor 4450e |
| Memory | 8GB |
| Ruby| 2.0.0p247 |# LICENSE
This source code is released under the MIT License, see LICENSE