# Re: Profiling Ruby Matrix operations

**URL:** <https://www.ruby-forum.com/t/re-profiling-ruby-matrix-operations/101846>\
**Category:** Ruby\
**Created:** [August 8, 2006, 10:59am UTC](https://www.ruby-forum.com/t/re-profiling-ruby-matrix-operations/101846 "2006-08-08T10:59:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![unknown](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/4bbf92/32.png) [@unknown](https://www.ruby-forum.com/u/unknown)\
**Post date:** [August 8, 2006, 10:59am UTC](https://www.ruby-forum.com/t/re-profiling-ruby-matrix-operations/101846/1 "2006-08-08T10:59:11Z")

</div>

> > This is the sort of code I’d _like_ to write in pure Ruby, rather than  
> > having to call a C library for efficiency. The matrix I generated is  
> > quite ill-conditioned. It’s quite possible that a “standard” floating  
> > point numerical determinant or matrix inversion routine would choke on  
> > it, while the combination of “matrix”, “mathn” and “rational” I used  
> > had no problem with it. In short, I’m willing to pay for rational  
> > arithmetic and correct results, but not for an inefficient  
> > interpreter. 🙂 So if someone is going to rewrite Matrix in C, they  
> > need to do the underlying arithmetic too.

There are some theoretical considerations about exact arithmetic, made  
processor-effiicient, in two papers:

E. Kaltofen and V. Pan.  
Processor efficient parallel solution of linear systems over an  
abstract  
field.  
In Proc. SPAA '91 3rd Ann. ACM Symp. Parallel Algor. Architecture,  
pages  
180-191, New York, N.Y., 1991. ACM Press

E. Kaltofen and V. Pan.  
Processor-efficient parallel solution of linear systems II: the  
positive  
characteristic and singular cases.  
In Proc. 33rd Annual Symp. Foundations of Comp. Sci., pages 714-723,  
Los  
Alamitos, California, 1992. IEEE Computer Society Press.

These can be downloaded from  
\_[Erich Kaltofen's Homepage](http://www4.ncsu.edu/~kaltofen/bibliography/index.html#SECTION00022000000000000000_)  
([Erich Kaltofen's Homepage](http://www4.ncsu.edu/~kaltofen/bibliography/index.html#SECTION00022000000000000000))

From the website, it looks as if these algorithms were implemented in  
LINBOX: a generic library for exact black box linear algebra. The  
homepage  
including downloads can be found at _[www.linalg.org](http://www.linalg.org)_  
([http://www.linalg.org/](http://www.linalg.org/)) .

Best regards,

Axel
